ETS-backed default implementation of MPP.Session.Store.
A GenServer owns the ETS table and serializes read-modify-write callbacks,
making update/2 atomic within one BEAM node. Use a shared custom backend for
channel state that must be consistent across multiple nodes.
Summary
Functions
Return a child specification for an ETS session store.
Delete channel state from the default store.
Delete channel state from a configured store instance.
Look up a channel in the default store.
Look up a channel in a configured store instance.
Insert or replace channel state in the default store.
Insert or replace channel state in a configured store instance.
Start an ETS session store.
Atomically update channel state in the default store.
Atomically update channel state in a configured store instance.
Functions
@spec child_spec(keyword()) :: Supervisor.child_spec()
Return a child specification for an ETS session store.
Delete channel state from the default store.
Delete channel state from a configured store instance.
@spec get(String.t()) :: {:ok, MPP.Session.Channel.t()} | :not_found | {:error, term()}
Look up a channel in the default store.
@spec get( String.t(), keyword() ) :: {:ok, MPP.Session.Channel.t()} | :not_found | {:error, term()}
Look up a channel in a configured store instance.
@spec put(MPP.Session.Channel.t()) :: :ok | {:error, term()}
Insert or replace channel state in the default store.
@spec put( MPP.Session.Channel.t(), keyword() ) :: :ok | {:error, term()}
Insert or replace channel state in a configured store instance.
@spec start_link(keyword()) :: GenServer.on_start()
Start an ETS session store.
@spec update(String.t(), MPP.Session.Store.update_fun()) :: {:ok, MPP.Session.Channel.t()} | {:error, term()}
Atomically update channel state in the default store.
@spec update(String.t(), MPP.Session.Store.update_fun(), keyword()) :: {:ok, MPP.Session.Channel.t()} | {:error, term()}
Atomically update channel state in a configured store instance.