pig/obs/terminal
Terminal pretty printer for SessionEvents.
OTP actor that receives SessionEvents and prints formatted output.
Pure format_event function for testing without side effects.
Values
pub fn format_event(event: events.SessionEvent) -> String
Format a SessionEvent as a human-readable string. This function is pure and has no side effects, making it easy to test.
pub fn start() -> Result(
process.Subject(events.SessionEvent),
actor.StartError,
)
Start the terminal printer actor. The actor will print formatted SessionEvents to stdout.
pub fn start_consumer() -> Result(
process.Subject(events.SessionEvent),
actor.StartError,
)
Start a terminal consumer actor that accepts SessionEvent directly. Used by the dispatcher to fan out events. Returns the Subject for registration. This is the consumer version of the actor — same as start() since terminal already receives SessionEvent directly.
pub fn supervised(
name: process.Name(events.SessionEvent),
) -> supervision.ChildSpecification(Nil)
Create a supervised terminal consumer actor for use in a supervision tree. The supervised actor’s message type is SessionEvent.