Statifier.Effect.Trace.EventDequeued (Statifier v2.0.0)

Copy Markdown View Source

Trace payload for {:trace, %__MODULE__{}} - emitted when an external or internal event is selected for processing (docs/observability.md constraint 2's "event dequeued" row). event is the dequeued Statifier.Event.t(); from names which queue it came off.

Built with new/2, never a struct literal, so macrostep/microstep/ round are always stamped from the Statifier.MachineState at hand and no call site can forget or duplicate them.

Summary

Functions

Stamps macrostep/microstep/round from machine_state and sets fields (:event, :from).

Types

t()

@type t() :: %Statifier.Effect.Trace.EventDequeued{
  event: Statifier.Event.t(),
  from: :external | :internal,
  macrostep: non_neg_integer(),
  microstep: non_neg_integer(),
  round: non_neg_integer()
}

Functions

new(machine_state, fields)

@spec new(machine_state :: Statifier.MachineState.t(), fields :: keyword()) :: t()

Stamps macrostep/microstep/round from machine_state and sets fields (:event, :from).