|
def | __del__ (self) |
|
def | __enter__ (self) |
|
def | __exit__ (self, exc_type, exc_val, exc_tb) |
|
def | __init__ (self, target, options, credentials, compression) |
|
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=None) |
|
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 () |
|
A cygrpc.Channel-backed implementation of grpc.Channel.
Definition at line 1462 of file grpc/_channel.py.
◆ __init__()
def grpc._channel.Channel.__init__ |
( |
|
self, |
|
|
|
target, |
|
|
|
options, |
|
|
|
credentials, |
|
|
|
compression |
|
) |
| |
Constructor.
Args:
target: The target to which to connect.
options: Configuration options for the channel.
credentials: A cygrpc.ChannelCredentials or None.
compression: An optional value indicating the compression method to be
used over the lifetime of the channel.
Definition at line 1465 of file grpc/_channel.py.
◆ __del__()
def grpc._channel.Channel.__del__ |
( |
|
self | ) |
|
◆ __enter__()
def grpc._channel.Channel.__enter__ |
( |
|
self | ) |
|
◆ __exit__()
def grpc._channel.Channel.__exit__ |
( |
|
self, |
|
|
|
exc_type, |
|
|
|
exc_val, |
|
|
|
exc_tb |
|
) |
| |
◆ _close()
def grpc._channel.Channel._close |
( |
|
self | ) |
|
|
private |
◆ _close_on_fork()
def grpc._channel.Channel._close_on_fork |
( |
|
self | ) |
|
|
private |
◆ _process_python_options()
def grpc._channel.Channel._process_python_options |
( |
|
self, |
|
|
|
python_options |
|
) |
| |
|
private |
Sets channel attributes according to python-only channel options.
Definition at line 1487 of file grpc/_channel.py.
◆ _unsubscribe_all()
def grpc._channel.Channel._unsubscribe_all |
( |
|
self | ) |
|
|
private |
◆ close()
def grpc._channel.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 1567 of file grpc/_channel.py.
◆ stream_stream()
def grpc._channel.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 1534 of file grpc/_channel.py.
◆ stream_unary()
def grpc._channel.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 1526 of file grpc/_channel.py.
◆ subscribe()
def grpc._channel.Channel.subscribe |
( |
|
self, |
|
|
|
callback, |
|
|
|
try_to_connect = None |
|
) |
| |
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 1493 of file grpc/_channel.py.
◆ unary_stream()
def grpc._channel.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 1507 of file grpc/_channel.py.
◆ unary_unary()
def grpc._channel.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 1499 of file grpc/_channel.py.
◆ unsubscribe()
def grpc._channel.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 1496 of file grpc/_channel.py.
◆ _call_state
grpc._channel.Channel._call_state |
|
private |
◆ _channel
grpc._channel.Channel._channel |
|
private |
◆ _connectivity_state
grpc._channel.Channel._connectivity_state |
|
private |
◆ _single_threaded_unary_stream
grpc._channel.Channel._single_threaded_unary_stream |
|
private |
The documentation for this class was generated from the following file: