Cyclium.Actor.Server (Cyclium v0.1.11)

Copy Markdown View Source

GenServer logic for Cyclium actors. Extracted from the macro to keep the Actor module clean and testable.

Summary

Functions

Enters drain mode: stops accepting new episodes but lets active ones finish. Schedule timers are cancelled. Event triggers are ignored.

Initializes actor state from a config map and raw expectations list.

Functions

enter_drain(state)

Enters drain mode: stops accepting new episodes but lets active ones finish. Schedule timers are cancelled. Event triggers are ignored.

handle_cast(arg1, state)

handle_info(arg1, state)

init_state(module, opts)

init_state_from_config(config, raw_expectations, module \\ nil)

Initializes actor state from a config map and raw expectations list.

Used by DynamicActor to start actors from DB-defined configurations without requiring a compiled actor module.

raw_expectations can be {id, opts_keyword_list} tuples (same as from the DSL) or %Expectation{} structs.