pyarrow.flight.ServerMiddleware¶
-
class
pyarrow.flight.ServerMiddleware¶ Bases:
pyarrow.lib._WeakrefableServer-side middleware for a call, instantiated per RPC.
Methods here should be fast and must be infalliable: they should not raise exceptions or stall indefinitely.
-
__init__()¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__()Initialize self.
call_completed(self, exception)A callback when the call finishes.
sending_headers(self)A callback before headers are sent.
-
call_completed(self, exception)¶ A callback when the call finishes.
- Parameters
exception (pyarrow.ArrowException) – If the call errored, this is the equivalent exception. Will be None if the call succeeded.
-
sending_headers(self)¶ A callback before headers are sent.
- Returns
headers (dict) – A dictionary of header values to add to the response, or None if no headers are to be added. The dictionary should have string keys and string or list-of-string values.
Bytes values are allowed, but the underlying transport may not support them or may restrict them. For gRPC, binary values are only allowed on headers ending in “-bin”.
-