ReqManagedAgents.Host.Store behaviour (req_managed_agents_host v0.1.0)

Copy Markdown View Source

Pluggable persistence for the session Locator. Mirrors RMA's Provisioner.Store ETS/File pattern one layer up: live-session locator rows, not provisioning digests. A store is referenced as {module(), keyword()}; ref/1 resolves the opts to the concrete handle the other callbacks take.

Summary

Types

key()

@type key() :: term()

ref()

@type ref() :: term()

store()

@type store() :: {module(), keyword()}

value()

@type value() :: term()

Callbacks

all(ref)

@callback all(ref()) :: [{key(), value()}]

delete(ref, key)

@callback delete(ref(), key()) :: :ok

get(ref, key)

@callback get(ref(), key()) :: {:ok, value()} | :miss

put(ref, key, value)

@callback put(ref(), key(), value()) :: :ok

ref(keyword)

@callback ref(keyword()) :: ref()

start_link(keyword)

@callback start_link(keyword()) :: {:ok, pid()} | :ignore | {:error, term()}