GitHub

RegistryService

API reference for RegistryService.

Holds the adapters by platform. get fails NoAdapter for a platform with none; registering a second adapter for a platform replaces the first.

Attributes

AttributeTypeDescription
descriptorsEffect[tuple[Descriptor, ...]]

The descriptors of every registered adapter.

Functions

register

register(adapter) -> Effect[None]
ParameterTypeDescription
adapterChatAdapter

Returns Effect[None]

def register(self, adapter: ChatAdapter) -> Effect[None]: ...

get

get(platform) -> Effect[ChatAdapter, ChatError]

The adapter for platform; NoAdapter when none is registered.

ParameterTypeDescription
platformstr

Returns Effect[ChatAdapter, ChatError]

def get(self, platform: str) -> Effect[ChatAdapter, ChatError]:
    """The adapter for ``platform``; ``NoAdapter`` when none is registered."""
    ...