API Docs¶
Base Endpoint API¶
The Endpoint
enables communication between different processes
as well as within a single process via various event-driven APIs.
-
lahja.base.EndpointAPI.
is_running
¶
-
lahja.base.EndpointAPI.
is_serving
¶
-
lahja.base.EndpointAPI.
name
¶
Base class for endpoint implementations that implements shared/common logic
-
lahja.base.BaseEndpoint.
is_running
¶
-
lahja.base.BaseEndpoint.
is_serving
¶
-
lahja.base.BaseEndpoint.
name
¶
AsyncioEndpoint¶
ConnectionConfig¶
Exceptions¶
-
exception
lahja.exceptions.
BindError
¶ Bases:
lahja.exceptions.LahjaError
Raise when an attempt was made to bind an event that is already bound.
-
exception
lahja.exceptions.
ConnectionAttemptRejected
¶ Bases:
lahja.exceptions.LahjaError
Raised when an attempt was made to connect to an endpoint that is already connected.
-
exception
lahja.exceptions.
RemoteDisconnected
¶ Bases:
lahja.exceptions.LahjaError
Raise when a remote disconnects while we attempting to read a message.
-
exception
lahja.exceptions.
UnexpectedResponse
¶ Bases:
lahja.exceptions.LahjaError
Raised when the type of a response did not match the
expected_response_type
.
BaseEvent¶
BaseRequestResponseEvent¶
-
class
lahja.common.
BaseRequestResponseEvent
¶ Bases:
abc.ABC
,lahja.common.BaseEvent
,typing.Generic
-
static
expected_response_type
() → Type[TResponse]¶ Return the type that is expected to be send back for this request. This ensures that at runtime, only expected responses can be send back to callsites that issued a BaseRequestResponseEvent
-
static