Public Member Functions | |
def | __enter__ (self) |
def | __exit__ (self, exc_type, exc_val, exc_tb) |
def | __init__ (self, channel, interceptor) |
def | close (self) |
def | stream_stream (self, method, request_serializer=None, response_deserializer=None) |
def | stream_unary (self, method, request_serializer=None, response_deserializer=None) |
def | subscribe (self, callback, try_to_connect=False) |
def | unary_stream (self, method, request_serializer=None, response_deserializer=None) |
def | unary_unary (self, method, request_serializer=None, response_deserializer=None) |
def | unsubscribe (self, callback) |
![]() | |
std::string | GetLoadBalancingPolicyName () const |
Returns the LB policy name, or the empty string if not yet available. More... | |
std::string | GetServiceConfigJSON () const |
grpc_connectivity_state | GetState (bool try_to_connect) override |
~Channel () override | |
![]() | |
template<typename T > | |
void | NotifyOnStateChange (grpc_connectivity_state last_observed, T deadline, grpc::CompletionQueue *cq, void *tag) |
template<typename T > | |
bool | WaitForConnected (T deadline) |
Wait for this channel to be connected. More... | |
template<typename T > | |
bool | WaitForStateChange (grpc_connectivity_state last_observed, T deadline) |
virtual | ~ChannelInterface () |
![]() | |
virtual | ~CallHook () |
Private Member Functions | |
def | _close (self) |
Private Attributes | |
_channel | |
_interceptor | |
Definition at line 480 of file _interceptor.py.
def grpc._interceptor._Channel.__init__ | ( | self, | |
channel, | |||
interceptor | |||
) |
Definition at line 482 of file _interceptor.py.
def grpc._interceptor._Channel.__enter__ | ( | self | ) |
Enters the runtime context related to the channel object.
Reimplemented from grpc::Channel.
Definition at line 539 of file _interceptor.py.
def grpc._interceptor._Channel.__exit__ | ( | self, | |
exc_type, | |||
exc_val, | |||
exc_tb | |||
) |
Exits the runtime context related to the channel object.
Reimplemented from grpc::Channel.
Definition at line 542 of file _interceptor.py.
|
private |
Definition at line 536 of file _interceptor.py.
def grpc._interceptor._Channel.close | ( | self | ) |
Closes this Channel and releases all resources held by it. Closing the Channel will immediately terminate all RPCs active with the Channel and it is not valid to invoke new RPCs with the Channel. This method is idempotent.
Reimplemented from grpc::Channel.
Definition at line 546 of file _interceptor.py.
def grpc._interceptor._Channel.stream_stream | ( | self, | |
method, | |||
request_serializer = None , |
|||
response_deserializer = None |
|||
) |
Creates a StreamStreamMultiCallable for a stream-stream method. Args: method: The name of the RPC method. request_serializer: Optional :term:`serializer` for serializing the request message. Request goes unserialized in case None is passed. response_deserializer: Optional :term:`deserializer` for deserializing the response message. Response goes undeserialized in case None is passed. Returns: A StreamStreamMultiCallable value for the named stream-stream method.
Reimplemented from grpc::Channel.
Definition at line 525 of file _interceptor.py.
def grpc._interceptor._Channel.stream_unary | ( | self, | |
method, | |||
request_serializer = None , |
|||
response_deserializer = None |
|||
) |
Creates a StreamUnaryMultiCallable for a stream-unary method. Args: method: The name of the RPC method. request_serializer: Optional :term:`serializer` for serializing the request message. Request goes unserialized in case None is passed. response_deserializer: Optional :term:`deserializer` for deserializing the response message. Response goes undeserialized in case None is passed. Returns: A StreamUnaryMultiCallable value for the named stream-unary method.
Reimplemented from grpc::Channel.
Definition at line 514 of file _interceptor.py.
def grpc._interceptor._Channel.subscribe | ( | self, | |
callback, | |||
try_to_connect = False |
|||
) |
Subscribe to this Channel's connectivity state machine. A Channel may be in any of the states described by ChannelConnectivity. This method allows application to monitor the state transitions. The typical use case is to debug or gain better visibility into gRPC runtime's state. Args: callback: A callable to be invoked with ChannelConnectivity argument. ChannelConnectivity describes current state of the channel. The callable will be invoked immediately upon subscription and again for every change to ChannelConnectivity until it is unsubscribed or this Channel object goes out of scope. try_to_connect: A boolean indicating whether or not this Channel should attempt to connect immediately. If set to False, gRPC runtime decides when to connect.
Reimplemented from grpc::Channel.
Definition at line 486 of file _interceptor.py.
def grpc._interceptor._Channel.unary_stream | ( | self, | |
method, | |||
request_serializer = None , |
|||
response_deserializer = None |
|||
) |
Creates a UnaryStreamMultiCallable for a unary-stream method. Args: method: The name of the RPC method. request_serializer: Optional :term:`serializer` for serializing the request message. Request goes unserialized in case None is passed. response_deserializer: Optional :term:`deserializer` for deserializing the response message. Response goes undeserialized in case None is passed. Returns: A UnaryStreamMultiCallable value for the name unary-stream method.
Reimplemented from grpc::Channel.
Definition at line 503 of file _interceptor.py.
def grpc._interceptor._Channel.unary_unary | ( | self, | |
method, | |||
request_serializer = None , |
|||
response_deserializer = None |
|||
) |
Creates a UnaryUnaryMultiCallable for a unary-unary method. Args: method: The name of the RPC method. request_serializer: Optional :term:`serializer` for serializing the request message. Request goes unserialized in case None is passed. response_deserializer: Optional :term:`deserializer` for deserializing the response message. Response goes undeserialized in case None is passed. Returns: A UnaryUnaryMultiCallable value for the named unary-unary method.
Reimplemented from grpc::Channel.
Definition at line 492 of file _interceptor.py.
def grpc._interceptor._Channel.unsubscribe | ( | self, | |
callback | |||
) |
Unsubscribes a subscribed callback from this Channel's connectivity. Args: callback: A callable previously registered with this Channel from having been passed to its "subscribe" method.
Reimplemented from grpc::Channel.
Definition at line 489 of file _interceptor.py.
|
private |
Definition at line 483 of file _interceptor.py.
|
private |
Definition at line 484 of file _interceptor.py.