Bandera. Config
(bandera v0.1.0)
Copy Markdown
Resolves all Bandera settings at RUNTIME and caches them in a :persistent_term
snapshot for cheap hot-path reads.
This module deliberately uses NO Application.compile_env/3. Every value is read
from Application.get_env/3 and can be changed at runtime via reload/0, with no
dependency recompilation. (Fixes fun_with_flags#122.)
Summary
Functions
Generate a random per-node id used to ignore self-published change notifications.
Whether the read cache is enabled (default true).
Cache time-to-live in seconds (default 900).
The SQL table name used by the Ecto adapter (default "bandera_flags").
The full notifications keyword config (adapter plus adapter-specific options).
The notifications adapter module (default Bandera.Notifications.Redis).
Whether cross-node cache-busting notifications are enabled (default false).
The full persistence keyword config (adapter plus adapter-specific options).
The persistence adapter module (default Bandera.Store.Persistent.Memory).
Re-read application env and rewrite the persistent_term snapshot.
Return the current snapshot, seeding it lazily if not yet present.
The active store module (default Bandera.Store.TwoLevel).
Types
Functions
@spec build_unique_id() :: String.t()
Generate a random per-node id used to ignore self-published change notifications.
@spec cache_enabled?() :: boolean()
Whether the read cache is enabled (default true).
@spec cache_ttl() :: non_neg_integer()
Cache time-to-live in seconds (default 900).
@spec ecto_table_name() :: String.t()
The SQL table name used by the Ecto adapter (default "bandera_flags").
@spec notifications() :: keyword()
The full notifications keyword config (adapter plus adapter-specific options).
@spec notifications_adapter() :: module()
The notifications adapter module (default Bandera.Notifications.Redis).
@spec notifications_enabled?() :: boolean()
Whether cross-node cache-busting notifications are enabled (default false).
@spec persistence() :: keyword()
The full persistence keyword config (adapter plus adapter-specific options).
@spec persistence_adapter() :: module()
The persistence adapter module (default Bandera.Store.Persistent.Memory).
@spec reload() :: :ok
Re-read application env and rewrite the persistent_term snapshot.
@spec snapshot() :: snapshot()
Return the current snapshot, seeding it lazily if not yet present.
@spec store() :: module()
The active store module (default Bandera.Store.TwoLevel).