Raxol.Cloud.StateManager (Raxol v0.5.0)

View Source

Centralized state management for Raxol cloud components.

This module provides a centralized way to store and retrieve state for all cloud components, eliminating the need for Process.put/2 and Process.get/1 in multiple modules.

Summary

Functions

Returns a specification to start this module under a supervisor.

Clears the state.

Gets a value from the state.

Gets the entire state.

Puts a value in the state.

Starts the state manager.

Updates a value in the state.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

clear(server \\ __MODULE__)

Clears the state.

get(server \\ __MODULE__, key)

Gets a value from the state.

get_all(server \\ __MODULE__)

Gets the entire state.

put(server \\ __MODULE__, key, value)

Puts a value in the state.

start_link(opts \\ [])

Starts the state manager.

update(server \\ __MODULE__, key, fun)

Updates a value in the state.