A small deterministic state process for adapter tests.
Each process keeps its initial snapshot so a test can reset it without global application state.
Summary
Functions
Returns a specification to start this module under a supervisor.
Gets one key from the current state.
Puts one key in the current state.
Restores the initial state snapshot.
Returns the current state snapshot.
Starts a mock state process.
Updates the current state and returns the new snapshot.
Types
@type server() :: GenServer.server()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Gets one key from the current state.
Puts one key in the current state.
@spec reset(server()) :: :ok
Restores the initial state snapshot.
Returns the current state snapshot.
@spec start_link(keyword()) :: GenServer.on_start()
Starts a mock state process.
Updates the current state and returns the new snapshot.