glossary.rst 2.3 KB

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