Single-node atomic ETS store for recurring subscriptions.
Use a shared durable backend implementing MPP.Subscription.Store when
subscriptions must survive node restarts or coordinate across nodes.
Summary
Functions
Return a child specification for a subscription store.
Delete a subscription from the default store.
Delete a subscription from a configured store instance.
Look up a subscription in the default store.
Look up a subscription in a configured store instance.
Insert or replace a subscription in the default store.
Insert or replace a subscription in a configured store instance.
Start an ETS subscription store.
Atomically update a subscription in the default store.
Atomically update a subscription in a configured store instance.
Functions
@spec child_spec(keyword()) :: Supervisor.child_spec()
Return a child specification for a subscription store.
Delete a subscription from the default store.
Delete a subscription from a configured store instance.
@spec get(String.t()) :: {:ok, MPP.Subscription.Record.t()} | :not_found | {:error, term()}
Look up a subscription in the default store.
@spec get( String.t(), keyword() ) :: {:ok, MPP.Subscription.Record.t()} | :not_found | {:error, term()}
Look up a subscription in a configured store instance.
@spec put(MPP.Subscription.Record.t()) :: :ok | {:error, term()}
Insert or replace a subscription in the default store.
@spec put( MPP.Subscription.Record.t(), keyword() ) :: :ok | {:error, term()}
Insert or replace a subscription in a configured store instance.
@spec start_link(keyword()) :: Agent.on_start()
Start an ETS subscription store.
@spec update(String.t(), MPP.Subscription.Store.update_fun()) :: {:ok, MPP.Subscription.Record.t()} | {:error, term()}
Atomically update a subscription in the default store.
@spec update(String.t(), MPP.Subscription.Store.update_fun(), keyword()) :: {:ok, MPP.Subscription.Record.t()} | {:error, term()}
Atomically update a subscription in a configured store instance.