Raxol.Core.StateManager.ProcessStrategy (Raxol v2.6.0)

View Source

Process-based state management strategy for StateManager. Each managed state ID corresponds to a named GenServer process.

Summary

Functions

Returns a specification to start this module under a supervisor.

Gets the current state for state_id.

Returns the registered process name for a state_id.

Starts a managed state GenServer for the given state_id.

Updates the managed state for state_id using an update function.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get(state_id)

Gets the current state for state_id.

process_name(state_id)

Returns the registered process name for a state_id.

start(state_id, initial_state, opts)

Starts a managed state GenServer for the given state_id.

update(state_id, update_fun)

Updates the managed state for state_id using an update function.