class documentation
class ServiceCall(Generic[
Constructor: ServiceCall(service_client, name, req_type, resp_type, ...)
Callable RPC method for services.
Async Method | __call__ |
Invoke underlying client with the given request. |
Method | __init__ |
Initialize the service call. |
Instance Variable | name |
Undocumented |
Instance Variable | req |
Undocumented |
Instance Variable | resp |
Undocumented |
Instance Variable | service |
Undocumented |
Instance Variable | service |
Undocumented |
async def __call__(self, req:
ServiceRequest
, *, retry: bool
= False, metadata: Mapping[ str, str]
= {}, timeout: Optional[ timedelta]
= None) -> ServiceResponse
:
(source)
¶
Invoke underlying client with the given request.
Parameters | |
req:ServiceRequest | Request for the call. |
retry:bool | If true, will use retry config to retry failed calls. |
metadata:Mapping[ | Headers used on the RPC call. Keys here override client-level RPC metadata keys. |
timeout:Optional[ | Optional RPC deadline to set for the RPC call. |
Returns | |
ServiceResponse | RPC response. |
Raises | |
RPCError | Any RPC error that occurs during the call. |
def __init__(self, service_client:
ServiceClient
, name: str
, req_type: Type[ ServiceRequest]
, resp_type: Type[ ServiceResponse]
, service: str
):
(source)
¶
Initialize the service call.