14 """Common types for gRPC Async API"""
16 from typing
import (Any, AsyncIterable, Callable, Iterable, Sequence, Tuple,
19 from grpc._cython.cygrpc
import EOF
21 from ._metadata
import Metadata
22 from ._metadata
import MetadataKey
23 from ._metadata
import MetadataValue
25 RequestType = TypeVar(
'RequestType')
26 ResponseType = TypeVar(
'ResponseType')
27 SerializingFunction = Callable[[Any], bytes]
28 DeserializingFunction = Callable[[bytes], Any]
29 MetadatumType = Tuple[MetadataKey, MetadataValue]
30 MetadataType = Union[Metadata, Sequence[MetadatumType]]
31 ChannelArgumentType = Sequence[Tuple[str, Any]]
33 DoneCallbackType = Callable[[Any],
None]
34 RequestIterableType = Union[Iterable[Any], AsyncIterable[Any]]
35 ResponseIterableType = AsyncIterable[Any]