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

Public Member Functions

def add_callback (self, callback)
 
def cancel (self)
 
def is_active (self)
 
def time_remaining (self)
 

Detailed Description

Provides RPC-related information and action.

Definition at line 309 of file src/python/grpcio/grpc/__init__.py.

Member Function Documentation

◆ add_callback()

def grpc.RpcContext.add_callback (   self,
  callback 
)
Registers a callback to be called on RPC termination.

Args:
  callback: A no-parameter callable to be called on RPC termination.

Returns:
  True if the callback was added and will be called later; False if
    the callback was not added and will not be called (because the RPC
    already terminated or some other reason).

Reimplemented in grpc._interceptor._FailureOutcome, grpc._channel._Rendezvous, grpc_testing._channel._invocation.ResponseIteratorCall, grpc._server._Context, grpc_testing._channel._invocation._FutureCall, grpc._interceptor._UnaryOutcome, grpc_testing._channel._invocation._RpcErrorCall, grpc_testing._channel._invocation._Call, and grpc_testing._server._servicer_context.ServicerContext.

Definition at line 342 of file src/python/grpcio/grpc/__init__.py.

◆ cancel()

def grpc.RpcContext.cancel (   self)

◆ is_active()

def grpc.RpcContext.is_active (   self)

◆ time_remaining()

def grpc.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._channel._Rendezvous, grpc_testing._channel._invocation.ResponseIteratorCall, grpc._server._Context, grpc_testing._channel._invocation._FutureCall, grpc._interceptor._UnaryOutcome, grpc._interceptor._FailureOutcome, grpc_testing._channel._invocation._RpcErrorCall, grpc_testing._channel._invocation._Call, and grpc_testing._server._servicer_context.ServicerContext.

Definition at line 323 of file src/python/grpcio/grpc/__init__.py.


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


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