GitHub

ServerOptions

API reference for ServerOptions.

How a server runs its handlers: in a span named the tag, or <span_prefix>.<tag> (no span with disable_tracing), at most concurrency at once, a defect ending every request of the client unless disable_fatal_defects, and waiting for the client's Ack after each stream chunk unless disable_client_acks.

on_disconnect (read by make and the layers over a protocol) is called with each client id the protocol reports disconnected, after the server asked for that client's requests to be interrupted; it does not wait for them. It is not called for a client that ends its input, or one still connected when the server stops. Each call runs in a fiber of its own, interrupted when the server stops; a failure is logged at UnhandledLogLevel and ignored.

Attributes

AttributeTypeDescription
disable_tracingbool = False
disable_span_propagationbool = False
span_prefixstr | None = None
span_attributesMapping[str, object] = field(default_factory=(dict[str, object]))
concurrencyConcurrency = 'unbounded'
disable_fatal_defectsbool = False
disable_client_acksbool = False
on_disconnectCallable[[int], Effect[None]] | None = None

Functions

__init__

__init__(disable_tracing=False, disable_span_propagation=False, span_prefix=None, span_attributes=dict[str, object](), concurrency='unbounded', disable_fatal_defects=False, disable_client_acks=False, on_disconnect=None) -> None
ParameterTypeDescription
disable_tracingbool = False
disable_span_propagationbool = False
span_prefixstr | None = None
span_attributesMapping[str, object] = dict[str, object]()
concurrencyConcurrency = 'unbounded'
disable_fatal_defectsbool = False
disable_client_acksbool = False
on_disconnectCallable[[int], Effect[None]] | None = None