Bandera. Store. Persistent. Memory
(bandera v0.1.0)
Copy Markdown
In-memory (ETS) persistence adapter. The default backend; suitable for single-node deployments and development. Not durable across restarts.
Rows are keyed by {flag_name, gate_id} so each gate has exactly one slot
(both percentage gate types share the "percentage" slot).
Examples
iex> alias Bandera.Store.Persistent.Memory
iex> Memory.put(:demo, Bandera.Gate.new(:boolean, true))
iex> {:ok, flag} = Memory.get(:demo)
iex> flag.gates
[%Bandera.Gate{type: :boolean, for: nil, enabled: true}]
iex> Memory.all_flag_names()
{:ok, [:demo]}
Summary
Functions
Returns a specification to start this module under a supervisor.
Starts the adapter GenServer, which owns the backing ETS table, under its module name.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(keyword()) :: GenServer.on_start()
Starts the adapter GenServer, which owns the backing ETS table, under its module name.