Expand description
DB-backed audience grant store
DB-backed audience grant store: a whole-table snapshot cache over the audience_grants table
(migration v7, rust/ingestion/src/sql_migration.rs), checked alongside the static grant map
by crate::policy::AudienceReadPolicy/crate::policy::AudienceMintPolicy – a selector
present in either source grants access, without either side being deep-cloned or merged into
a combined map (current() hands back the cached grants behind an Arc). This is what makes
a grant creatable without a service restart – the static map stays the bootstrap/test-only
layer.
The cache mechanics (cold-start throttling, last-good serving, ProviderUnavailable
wrapping) live in crate::db_snapshot, shared with crate::groups::DbGroupsSource.
Structs§
- Audience
Grants Loader SnapshotLoaderfor theaudience_grantstable.- DbAudience
Grants Config - Cache-TTL knob for
DbAudienceGrantsSource, read from env with a default.
Type Aliases§
- DbAudience
Grants Source - The whole-table snapshot cache described in the module doc comment.