Skip to content

ActorContext

casty.ActorContext

Bases: Protocol

Protocol for the context available to actor behavior handlers.

self property

system property

log property

spawn(behavior, name, *, mailbox=None)

stop(ref)

watch(ref)

unwatch(ref)

on_stop(callback)

register_interceptor(interceptor)

pipe_to_self(coro, mapper=None, on_failure=None)

pipe_to_self(
    coro: Awaitable[M],
    *,
    on_failure: Callable[[Exception], M] | None = None,
) -> None
pipe_to_self(
    coro: Awaitable[T],
    mapper: Callable[[T], M],
    on_failure: Callable[[Exception], M] | None = None,
) -> None

casty.Interceptor = Callable[[object], bool]

casty.System

Bases: Protocol

Protocol exposing the actor system's public API to behaviors.

name property

event_stream property

scheduler property

__make_ref__(id, deliver)

spawn(behavior, name, *, mailbox=None)

ask(ref, msg_factory, *, timeout) async

ask_or_none(ref, msg_factory, *, timeout) async

lookup(path)

shutdown() async