Foundation.Services.EventStore (foundation v0.1.0)
Event storage service implementation using GenServer.
Provides persistent event storage with querying capabilities.
Summary
Functions
Returns a specification to start this module under a supervisor.
Reset all stored events and metrics for testing purposes.
Types
@type server_state() :: %{ events: %{required(non_neg_integer()) => Foundation.Types.Event.t()}, next_id: non_neg_integer(), metrics: map() }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec initialize(keyword()) :: :ok | {:error, Foundation.Types.Error.t()}
@spec reset_state() :: :ok | {:error, Foundation.Types.Error.t()}
Reset all stored events and metrics for testing purposes.
This function should only be used in test environments.
@spec start_link(keyword()) :: GenServer.on_start()
@spec stop() :: :ok