Public Member Functions | List of all members
grpc.aio._base_call.RpcContext Class Reference
Inheritance diagram for grpc.aio._base_call.RpcContext:
Inheritance graph
[legend]

Public Member Functions

None add_done_callback (self, DoneCallbackType callback)
 
bool cancel (self)
 
bool cancelled (self)
 
bool done (self)
 
Optional[float] time_remaining (self)
 

Detailed Description

Provides RPC-related information and action.

Definition at line 36 of file _base_call.py.

Member Function Documentation

◆ add_done_callback()

None grpc.aio._base_call.RpcContext.add_done_callback (   self,
DoneCallbackType  callback 
)
Registers a callback to be called on RPC termination.

Args:
  callback: A callable object will be called with the call object as
  its only argument.

Definition at line 80 of file _base_call.py.

◆ cancel()

bool grpc.aio._base_call.RpcContext.cancel (   self)
Cancels the RPC.

Idempotent and has no effect if the RPC has already terminated.

Returns:
  A bool indicates if the cancellation is performed or not.

Reimplemented in grpc.aio._interceptor.UnaryUnaryCallResponse.

Definition at line 70 of file _base_call.py.

◆ cancelled()

bool grpc.aio._base_call.RpcContext.cancelled (   self)
Return True if the RPC is cancelled.

The RPC is cancelled when the cancellation was requested with cancel().

Returns:
  A bool indicates whether the RPC is cancelled or not.

Reimplemented in grpc.aio._interceptor.UnaryUnaryCallResponse.

Definition at line 40 of file _base_call.py.

◆ done()

bool grpc.aio._base_call.RpcContext.done (   self)
Return True if the RPC is done.

An RPC is done if the RPC is completed, cancelled or aborted.

Returns:
  A bool indicates if the RPC is done.

Reimplemented in grpc.aio._interceptor.UnaryUnaryCallResponse.

Definition at line 50 of file _base_call.py.

◆ time_remaining()

Optional[float] grpc.aio._base_call.RpcContext.time_remaining (   self)
Describes the length of allowed time remaining for the RPC.

Returns:
  A nonnegative float indicating the length of allowed time in seconds
  remaining for the RPC to complete before it is considered to have
  timed out, or None if no deadline was specified for the RPC.

Reimplemented in grpc.aio._interceptor.UnaryUnaryCallResponse, grpc.aio._interceptor.InterceptedStreamStreamCall, grpc.aio._interceptor.InterceptedStreamUnaryCall, grpc.aio._interceptor.InterceptedUnaryStreamCall, and grpc.aio._interceptor.InterceptedUnaryUnaryCall.

Definition at line 60 of file _base_call.py.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:32