GitHub

cluster_schema

API reference for cluster_schema.

RPC annotations that change how a cluster delivers an entity's messages (Effect's ClusterSchema). Set them with rpc.annotate.

Values

AttributeTypeDescription
ABANDON_ANNOTATIONContext[Any]

What an abandoning interruption is annotated with.

Types

TypeDefinitionDescription
UninterruptibleModetype UninterruptibleMode = bool | Literal['client', 'server']
DynamicAnnotationstype DynamicAnnotations = Callable[[Context[Any], Request[Any]], Context[Any]]

Classes

Functions

is_uninterruptible_for_server

is_uninterruptible_for_server(annotations) -> bool
ParameterTypeDescription
annotationsContext

Returns bool

def is_uninterruptible_for_server(annotations: Context) -> bool:
    value = annotations.get(Uninterruptible)
    return value is True or value == "server"

is_uninterruptible_for_client

is_uninterruptible_for_client(annotations) -> bool
ParameterTypeDescription
annotationsContext

Returns bool

def is_uninterruptible_for_client(annotations: Context) -> bool:
    value = annotations.get(Uninterruptible)
    return value is True or value == "client"