class documentation

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

Instances of this class behave like a gRPC UnaryUnaryMultiCallable but ensure that the underlying transport channel is obtained from the SDK Channel pool and returned (or discarded) when the RPC completes.

Method __call__ Invoke the underlying unary-unary RPC on an address channel.
Method __init__ Create a callable wrapper that returns requests bound to an AddressChannel from the SDK Channel.
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. The returned grpc.aio.UnaryUnaryCall has a done-callback attached that returns or discards the address channel back to the channel pool when the RPC completes.

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 that returns requests bound to an AddressChannel from the SDK Channel.

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