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(
  consumer_spec.StartedConsumer,
  actor.StartError,
)

Start a terminal consumer and return its owned endpoint.

pub fn start_consumer() -> Result(
  consumer_spec.StartedConsumer,
  actor.StartError,
)

Start a terminal consumer for dispatcher registration.

pub fn stop(consumer: consumer_spec.StartedConsumer) -> Nil

Stop a terminal consumer via its typed Stop message.

pub fn supervised(
  name: process.Name(consumer_spec.SupervisedMessage),
) -> supervision.ChildSpecification(Nil)

Create a supervised terminal consumer with a graceful drain control.

Search Document