Skip to main content

Module settings

Module settings 

Source
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. None means no row (or an unregistered key).
EnvFallbacks
The env-and-default half of the resolution order, resolved once per process at startup.
SelfServiceSettings
Self-service knobs resolved to concrete values.
SettingSpec
One registered setting.
SettingsDataFusionConfig
DataFusionConfigSource backed by the DB settings for one service role.
SettingsLoader
SnapshotLoader for the settings table.
SettingsSource
Typed access to the settings, resolving DB row, then env var, then built-in default.

Enums§

ServiceRole
Which service a SettingsDataFusionConfig serves; each reads its own setting key.
SettingKind
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 as i64 downstream: a value that overflows i64 warns 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 0 a 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.