Serializes persistence writes to the configured adapter.
The Botica.Flags.Store GenServer delegates every mutation to this
writer via cast, so disk writes happen strictly one at a time in
mailbox order. This avoids read-modify-write races between concurrent
flag mutations (two writes reading the same file and one overwriting
the other).
The writer is deliberately NOT linked to the Store: a slow disk must never crash the flags registry. Errors are logged, not raised.
Supervision
Started by Botica.Application after the Store. If the Store is
restarted, the writer keeps its queue — writes are idempotent against
the adapter.
Summary
Functions
Returns a specification to start this module under a supervisor.
Enqueues a flag deletion. Returns :ok immediately.
Number of pending writes in the mailbox queue (diagnostics).
Enqueues a flag save. Returns :ok immediately; the write happens
asynchronously in mailbox order.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec delete(atom()) :: :ok
Enqueues a flag deletion. Returns :ok immediately.
@spec pending() :: non_neg_integer()
Number of pending writes in the mailbox queue (diagnostics).
@spec save(Botica.Flags.Flag.t()) :: :ok
Enqueues a flag save. Returns :ok immediately; the write happens
asynchronously in mailbox order.