Public Member Functions | Private Attributes | List of all members
generic_client_interceptor._GenericClientInterceptor Class Reference
Inheritance diagram for generic_client_interceptor._GenericClientInterceptor:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, interceptor_function)
 
def intercept_stream_stream (self, continuation, client_call_details, request_iterator)
 
def intercept_stream_unary (self, continuation, client_call_details, request_iterator)
 
def intercept_unary_stream (self, continuation, client_call_details, request)
 
def intercept_unary_unary (self, continuation, client_call_details, request)
 

Private Attributes

 _fn
 

Detailed Description

Definition at line 22 of file generic_client_interceptor.py.

Constructor & Destructor Documentation

◆ __init__()

def generic_client_interceptor._GenericClientInterceptor.__init__ (   self,
  interceptor_function 
)

Definition at line 24 of file generic_client_interceptor.py.

Member Function Documentation

◆ intercept_stream_stream()

def generic_client_interceptor._GenericClientInterceptor.intercept_stream_stream (   self,
  continuation,
  client_call_details,
  request_iterator 
)
Intercepts a stream-stream invocation.

Args:
  continuation: A function that proceeds with the invocation by
    executing the next interceptor in chain or invoking the
    actual RPC on the underlying Channel. It is the interceptor's
    responsibility to call it if it decides to move the RPC forward.
    The interceptor can use
    `response_iterator = continuation(client_call_details, request_iterator)`
    to continue with the RPC. `continuation` returns an object that is
    both a Call for the RPC and an iterator for response values.
    Drawing response values from the returned Call-iterator may
    raise RpcError indicating termination of the RPC with non-OK
    status.
  client_call_details: A ClientCallDetails object describing the
    outgoing RPC.
  request_iterator: An iterator that yields request values for the RPC.

Returns:
  An object that is both a Call for the RPC and an iterator of
  response values. Drawing response values from the returned
  Call-iterator may raise RpcError indicating termination of
  the RPC with non-OK status. This object *should* also fulfill the
  Future interface, though it may not.

Reimplemented from grpc.StreamStreamClientInterceptor.

Definition at line 47 of file generic_client_interceptor.py.

◆ intercept_stream_unary()

def generic_client_interceptor._GenericClientInterceptor.intercept_stream_unary (   self,
  continuation,
  client_call_details,
  request_iterator 
)
Intercepts a stream-unary invocation asynchronously.

Args:
  continuation: A function that proceeds with the invocation by
    executing the next interceptor in chain or invoking the
    actual RPC on the underlying Channel. It is the interceptor's
    responsibility to call it if it decides to move the RPC forward.
    The interceptor can use
    `response_future = continuation(client_call_details, request_iterator)`
    to continue with the RPC. `continuation` returns an object that is
    both a Call for the RPC and a Future. In the event of RPC completion,
    the return Call-Future's result value will be the response message
    of the RPC. Should the event terminate with non-OK status, the
    returned Call-Future's exception value will be an RpcError.
  client_call_details: A ClientCallDetails object describing the
    outgoing RPC.
  request_iterator: An iterator that yields request values for the RPC.

Returns:
  An object that is both a Call for the RPC and a Future.
  In the event of RPC completion, the return Call-Future's
  result value will be the response message of the RPC.
  Should the event terminate with non-OK status, the returned
  Call-Future's exception value will be an RpcError.

Reimplemented from grpc.StreamUnaryClientInterceptor.

Definition at line 40 of file generic_client_interceptor.py.

◆ intercept_unary_stream()

def generic_client_interceptor._GenericClientInterceptor.intercept_unary_stream (   self,
  continuation,
  client_call_details,
  request 
)
Intercepts a unary-stream invocation.

Args:
  continuation: A function that proceeds with the invocation by
    executing the next interceptor in chain or invoking the
    actual RPC on the underlying Channel. It is the interceptor's
    responsibility to call it if it decides to move the RPC forward.
    The interceptor can use
    `response_iterator = continuation(client_call_details, request)`
    to continue with the RPC. `continuation` returns an object that is
    both a Call for the RPC and an iterator for response values.
    Drawing response values from the returned Call-iterator may
    raise RpcError indicating termination of the RPC with non-OK
    status.
  client_call_details: A ClientCallDetails object describing the
    outgoing RPC.
  request: The request value for the RPC.

Returns:
    An object that is both a Call for the RPC and an iterator of
    response values. Drawing response values from the returned
    Call-iterator may raise RpcError indicating termination of
    the RPC with non-OK status. This object *should* also fulfill the
    Future interface, though it may not.

Reimplemented from grpc.UnaryStreamClientInterceptor.

Definition at line 33 of file generic_client_interceptor.py.

◆ intercept_unary_unary()

def generic_client_interceptor._GenericClientInterceptor.intercept_unary_unary (   self,
  continuation,
  client_call_details,
  request 
)
Intercepts a unary-unary invocation asynchronously.

Args:
  continuation: A function that proceeds with the invocation by
    executing the next interceptor in chain or invoking the
    actual RPC on the underlying Channel. It is the interceptor's
    responsibility to call it if it decides to move the RPC forward.
    The interceptor can use
    `response_future = continuation(client_call_details, request)`
    to continue with the RPC. `continuation` returns an object that is
    both a Call for the RPC and a Future. In the event of RPC
    completion, the return Call-Future's result value will be
    the response message of the RPC. Should the event terminate
    with non-OK status, the returned Call-Future's exception value
    will be an RpcError.
  client_call_details: A ClientCallDetails object describing the
    outgoing RPC.
  request: The request value for the RPC.

Returns:
    An object that is both a Call for the RPC and a Future.
    In the event of RPC completion, the return Call-Future's
    result value will be the response message of the RPC.
    Should the event terminate with non-OK status, the returned
    Call-Future's exception value will be an RpcError.

Reimplemented from grpc.UnaryUnaryClientInterceptor.

Definition at line 27 of file generic_client_interceptor.py.

Member Data Documentation

◆ _fn

generic_client_interceptor._GenericClientInterceptor._fn
private

Definition at line 25 of file generic_client_interceptor.py.


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


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