constellation
High-level configuration and lifecycle API for Constellation OTP stages.
Types
Configuration for an event engine.
pub type Config(event) =
otp.Config(event)
Values
pub fn push(
engine: otp.Stage(event),
events: List(event),
) -> Result(Nil, otp.CallError)
Pushes events into the engine.
pub fn start() -> Result(
actor.Started(otp.Stage(event)),
actor.StartError,
)
Starts an engine with default demand dispatching.
pub fn start_with_config(
config: otp.Config(event),
) -> Result(actor.Started(otp.Stage(event)), actor.StartError)
Starts an engine with explicit configuration.
pub fn stop(
engine: otp.Stage(event),
) -> Result(Nil, otp.CallError)
Gracefully cancels subscriptions and stops the engine.
pub fn with_buffer_capacity(
config: otp.Config(event),
capacity: Int,
) -> Result(otp.Config(event), otp.ConfigError)
Limits how many events may wait without downstream demand.
pub fn with_call_timeout(
config: otp.Config(event),
milliseconds: Int,
) -> Result(otp.Config(event), otp.ConfigError)
Sets the timeout used by synchronous engine calls.
pub fn with_logging(
config: otp.Config(event),
) -> otp.Config(event)
Enables the standard Erlang logger reporter.
pub fn with_reporter(
config: otp.Config(event),
reporter: fn(telemetry.Event) -> Nil,
) -> otp.Config(event)
Installs a custom structured telemetry reporter.
pub fn with_strategy(
config: otp.Config(event),
strategy: dispatcher.Strategy(event),
) -> otp.Config(event)
Replaces the engine’s pure dispatch strategy.