Glossary¶
- metadatum¶
A key-value pair included in the HTTP header. It is a2-tuple where the first entry is the key and thesecond is the value, i.e. (key, value). The metadata key is an ASCII str,and must be a valid HTTP header name. The metadata value can beeither a valid HTTP ASCII str, or bytes. If bytes are provided,the key must end with ‘-bin’, i.e.
('binary-metadata-bin',b'\\x00\\xFF')- metadata¶
A sequence of metadatum.
- serializer¶
A callable function that encodes an object into bytes. Applications areallowed to provide any customized serializer, so there isn’t a restrictionfor the input object (i.e. even
None). On the server-side, theserializer is invoked with server handler’s return value; on theclient-side, the serializer is invoked with outbound message objects.- deserializer¶
A callable function that decodes bytes into an object. Same as serializer,the returned object doesn’t have restrictions (i.e.
Noneallowed). Thedeserializer is invoked with inbound message bytes on both the server sideand the client-side.- wait_for_ready¶
If an RPC is issued but the channel is in the TRANSIENT_FAILURE or SHUTDOWNstates, the library cannot transmit the RPC at the moment. By default, thegRPC library will fail such RPCs immediately. This is known as “fail fast.”RPCs will not fail as a result of the channel being in other states(CONNECTING, READY, or IDLE).
When the wait_for_ready option is specified, the library will queue RPCsuntil the channel is READY. Any submitted RPCs may still fail before theREADY state is reached for other reasons, e.g., the client channel has beenshut down or the RPC’s deadline has been reached.
- channel_arguments¶
A list of key-value pairs to configure the underlying gRPC Core channel orserver object. Channel arguments are meant for advanced usages and containexperimental API (some may not labeled as experimental). Full list ofavailable channel arguments and documentation can be found under the“grpc_arg_keys” section of “channel_arg_names.h” header file(https://github.com/grpc/grpc/blob/v1.76.x/include/grpc/impl/channel_arg_names.h). For example, if you want to disable TCP portreuse, you may construct channel arguments like:
options=(('grpc.so_reuseport',0),).