Global monitor for the Arrea engine.
Responsible for:
- Registering and updating worker state
- Notifying worker completion
- Providing aggregate statistics for workers, tasks, and errors
The Monitor is an internal component that accumulates statistics. External
subscribers live on Arrea.Leader; the Monitor no longer maintains a
subscriber set of its own.
Summary
Functions
Child specification for the supervision tree.
Returns the current state of the monitor.
Returns summarised Engine statistics.
Registers a worker in the monitor.
Starts the Monitor as a GenServer with name Elixir.Arrea.Monitor.
Updates a worker's state.
Notifies the monitor that a worker has finished.
Functions
Child specification for the supervision tree.
@spec get_state() :: map()
Returns the current state of the monitor.
@spec get_stats() :: {:ok, map()}
Returns summarised Engine statistics.
Registers a worker in the monitor.
@spec start_link(keyword()) :: GenServer.on_start()
Starts the Monitor as a GenServer with name Elixir.Arrea.Monitor.
Updates a worker's state.
Notifies the monitor that a worker has finished.