Botica.Flags.Persistence.Disk (Botica v2.2.0)

Copy Markdown View Source

Disk-backed persistence adapter for feature flags.

Flags are stored as a single JSON document (map keyed by flag name) written atomically via Apero.Atomic.File, so a crash mid-write never corrupts the file. Default path is ~/.botica/flags.json; override with opts: [path: ...] in the :flags_persistence config.

Configuration

config :botica, :flags_persistence, [
  adapter: Botica.Flags.Persistence.Disk,
  opts: [path: "/var/lib/botica/flags.json"]
]