Expand description
DB-backed deployment settings.
The settings table (data-lake migration v12) is a generic key/value store. SETTINGS is
the registry of keys a service understands: it drives the admin page and holds the single
validation rule shared by the write path and the loader. A key with no row is “unset”, and the
consuming service falls back to the env var, then to the built-in default.
Each service caches the whole table through SnapshotSource, the same cache the
audience-grant and group stores use, and reads typed values through SettingsSource.
Structs§
- DbOverrides
- The DB values, already parsed into typed fields.
Nonemeans no row (or an unregistered key). - EnvFallbacks
- The env-and-default half of the resolution order, resolved once per process at startup.
- Self
Service Settings - Self-service knobs resolved to concrete values.
- Setting
Spec - One registered setting.
- Settings
Data Fusion Config DataFusionConfigSourcebacked by the DB settings for one service role.- Settings
Loader SnapshotLoaderfor thesettingstable.- Settings
Source - Typed access to the settings, resolving DB row, then env var, then built-in default.
Enums§
- Service
Role - Which service a
SettingsDataFusionConfigserves; each reads its own setting key. - Setting
Kind - The JSON shape a setting’s value must have.
Constants§
- DATAFUSION_
CONFIG_ MAINTENANCE - DATAFUSION_
CONFIG_ QUERY - DEPLOYMENT_
NOTES - PUBLIC_
VIEW_ SETS - RETENTION_
BY_ STREAM_ TAG - RETENTION_
DAYS - SELF_
SERVICE_ MAX_ CLAIMS_ PER_ CALLER - SELF_
SERVICE_ MAX_ GRANTS_ PER_ CALLER - SELF_
SERVICE_ MAX_ KEYS_ PER_ CALLER - SELF_
SERVICE_ MINT - SETTINGS
Functions§
- find_
spec - Looks a key up in
SETTINGS. - parse_
tag_ horizons - Parses
{tag: days | "forever"}. - resolve_
bool_ env - Parses a boolean env knob the
v == "true" || v == "1"way. - resolve_
i64_ env - Same as
resolve_u64_env, for a knob stored asi64downstream: a value that overflowsi64warns and defaults rather than wrapping negative. - resolve_
u64_ env - Parses an unsigned integer env knob, warn-and-default on an unparseable value. Parsing
unsigned makes a negative value a parse failure, and
0a valid “none permitted”. - settings_
cache_ ttl MICROMEGAS_AUTH_CACHE_TTL_SECONDS, which governs every snapshot cache in the process.- shadowed
- The registered settings that have a stored row and whose env var is also set.