xref: /aosp_15_r20/external/grpc-grpc/doc/python/sphinx/glossary.rst (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1*cc02d7e2SAndroid Build Coastguard WorkerGlossary
2*cc02d7e2SAndroid Build Coastguard Worker================
3*cc02d7e2SAndroid Build Coastguard Worker
4*cc02d7e2SAndroid Build Coastguard Worker.. glossary::
5*cc02d7e2SAndroid Build Coastguard Worker
6*cc02d7e2SAndroid Build Coastguard Worker  metadatum
7*cc02d7e2SAndroid Build Coastguard Worker    A key-value pair included in the HTTP header.  It is a
8*cc02d7e2SAndroid Build Coastguard Worker    2-tuple where the first entry is the key and the
9*cc02d7e2SAndroid Build Coastguard Worker    second is the value, i.e. (key, value).  The metadata key is an ASCII str,
10*cc02d7e2SAndroid Build Coastguard Worker    and must be a valid HTTP header name.  The metadata value can be
11*cc02d7e2SAndroid Build Coastguard Worker    either a valid HTTP ASCII str, or bytes.  If bytes are provided,
12*cc02d7e2SAndroid Build Coastguard Worker    the key must end with '-bin', i.e.
13*cc02d7e2SAndroid Build Coastguard Worker    ``('binary-metadata-bin', b'\\x00\\xFF')``
14*cc02d7e2SAndroid Build Coastguard Worker
15*cc02d7e2SAndroid Build Coastguard Worker  metadata
16*cc02d7e2SAndroid Build Coastguard Worker    A sequence of metadatum.
17*cc02d7e2SAndroid Build Coastguard Worker
18*cc02d7e2SAndroid Build Coastguard Worker  serializer
19*cc02d7e2SAndroid Build Coastguard Worker    A callable function that encodes an object into bytes. Applications are
20*cc02d7e2SAndroid Build Coastguard Worker    allowed to provide any customized serializer, so there isn't a restriction
21*cc02d7e2SAndroid Build Coastguard Worker    for the input object (i.e. even ``None``). On the server-side, the
22*cc02d7e2SAndroid Build Coastguard Worker    serializer is invoked with server handler's return value; on the
23*cc02d7e2SAndroid Build Coastguard Worker    client-side, the serializer is invoked with outbound message objects.
24*cc02d7e2SAndroid Build Coastguard Worker
25*cc02d7e2SAndroid Build Coastguard Worker  deserializer
26*cc02d7e2SAndroid Build Coastguard Worker    A callable function that decodes bytes into an object. Same as serializer,
27*cc02d7e2SAndroid Build Coastguard Worker    the returned object doesn't have restrictions (i.e. ``None`` allowed). The
28*cc02d7e2SAndroid Build Coastguard Worker    deserializer is invoked with inbound message bytes on both the server side
29*cc02d7e2SAndroid Build Coastguard Worker    and the client-side.
30*cc02d7e2SAndroid Build Coastguard Worker
31*cc02d7e2SAndroid Build Coastguard Worker  wait_for_ready
32*cc02d7e2SAndroid Build Coastguard Worker    If an RPC is issued but the channel is in the TRANSIENT_FAILURE or SHUTDOWN
33*cc02d7e2SAndroid Build Coastguard Worker    states, the library cannot transmit the RPC at the moment. By default, the
34*cc02d7e2SAndroid Build Coastguard Worker    gRPC library will fail such RPCs immediately. This is known as "fail fast."
35*cc02d7e2SAndroid Build Coastguard Worker    RPCs will not fail as a result of the channel being in other states
36*cc02d7e2SAndroid Build Coastguard Worker    (CONNECTING, READY, or IDLE).
37*cc02d7e2SAndroid Build Coastguard Worker
38*cc02d7e2SAndroid Build Coastguard Worker    When the wait_for_ready option is specified, the library will queue RPCs
39*cc02d7e2SAndroid Build Coastguard Worker    until the channel is READY. Any submitted RPCs may still fail before the
40*cc02d7e2SAndroid Build Coastguard Worker    READY state is reached for other reasons, e.g., the client channel has been
41*cc02d7e2SAndroid Build Coastguard Worker    shut down or the RPC's deadline has been reached.
42*cc02d7e2SAndroid Build Coastguard Worker
43*cc02d7e2SAndroid Build Coastguard Worker  channel_arguments
44*cc02d7e2SAndroid Build Coastguard Worker    A list of key-value pairs to configure the underlying gRPC Core channel or
45*cc02d7e2SAndroid Build Coastguard Worker    server object. Channel arguments are meant for advanced usages and contain
46*cc02d7e2SAndroid Build Coastguard Worker    experimental API (some may not labeled as experimental). Full list of
47*cc02d7e2SAndroid Build Coastguard Worker    available channel arguments and documentation can be found under the
48*cc02d7e2SAndroid Build Coastguard Worker    "grpc_arg_keys" section of "channel_arg_names.h" header file
49*cc02d7e2SAndroid Build Coastguard Worker    (|channel_arg_names_link|). For example, if you want to disable TCP port
50*cc02d7e2SAndroid Build Coastguard Worker    reuse, you may construct channel arguments like:
51*cc02d7e2SAndroid Build Coastguard Worker    ``options = (('grpc.so_reuseport', 0),)``.
52