class documentation

A small callable wrapper that binds RPC calls to a Channel-managed address.

Instances act as gRPC UnaryUnaryMultiCallable objects. They get the transport channel from the SDK Channel pool. When the RPC is complete, they return or discard the transport channel.

Method __call__ Invoke the underlying unary-unary RPC on an address channel.
Method __init__ Create a callable wrapper bound to an SDK AddressChannel.
Instance Variable _channel Undocumented
Instance Variable _method Undocumented
Instance Variable _request_serializer Undocumented
Instance Variable _response_deserializer Undocumented
def __call__(self, request: Req, *, timeout: float | None = None, metadata: MetadataType | None = None, credentials: CallCredentials | None = None, wait_for_ready: bool | None = None, compression: Compression | None = None) -> UnaryUnaryCall[Req, Res]: (source)

Invoke the underlying unary-unary RPC on an address channel.

This method resolves the concrete address for self._method and requests an AddressChannel from the parent Channel. A completion callback on the returned grpc.aio.UnaryUnaryCall returns or discards the address channel after the RPC.

Parameters
request:ReqThe protobuf request message to send.
timeout:float | NoneOptional per-call timeout in seconds.
metadata:MetadataType | NoneOptional gRPC metadata to send with the request.
credentials:CallCredentials | NoneOptional per-call call-credentials.
wait_for_ready:bool | NoneOptional gRPC wait_for_ready flag.
compression:Compression | NoneOptional gRPC compression setting.
Returns
UnaryUnaryCall[Req, Res]A grpc.aio.UnaryUnaryCall representing the in-flight RPC. The caller may await or add callbacks to the returned object.
def __init__(self, channel: Channel, method: str, request_serializer: SerializingFunction | None = None, response_deserializer: DeserializingFunction | None = None): (source)

Create a callable wrapper bound to an SDK AddressChannel.

Parameters
channel:ChannelThe SDK Channel instance used to obtain a transport channel for the RPC.
method:strFull RPC method string ('/package.service/Method').
request_serializer:SerializingFunction | NoneOptional serializer used by gRPC.
response_deserializer:DeserializingFunction | NoneOptional deserializer used by gRPC.
_channel = (source)

Undocumented

Undocumented

_request_serializer = (source)

Undocumented

_response_deserializer = (source)

Undocumented