Expand description
Shared runtime configuration primitives for Aster services.
This crate owns product-neutral configuration mechanics: typed configuration definitions, registry construction, storage value conversion, in-process runtime snapshots, reload diffing, and cross-process reload notifications. Product crates still own their concrete database entities, repositories, localized labels, config keys, domain-specific normalizers, and any derived runtime state that is built from configuration values.
Modules§
- avatar
- Gravatar configuration helpers.
Macros§
- define_
config_ registry - Builds a static
ConfigRegistryfrom a list ofConfigDefinitionitems.
Structs§
- Async
Config Snapshot - Immutable snapshot exposed by
AsyncRuntimeConfig. - Async
Runtime Config - Async runtime configuration cache.
- Config
Definition - Product-owned metadata for one configuration key.
- Config
Notification - Subscription returned by config notifiers.
- Config
Registry - Static registry of product configuration definitions.
- Config
Reload Message - Notification payload published after configuration changes.
- Config
Reload Observation - Observability event emitted after handling a config reload notification.
- Config
Reload Worker Config - Runtime reload worker configuration.
- Config
Seed Record - Seed row produced from a registry definition.
- Config
Sync Config - Static configuration for cross-process config reload synchronization.
- Config
Sync Connection Observation - Low-cardinality observation emitted for config-sync connection transitions.
- Config
Sync Runtime - Namespaced runtime handle for cross-process config synchronization.
- InMemory
Config Notifier - In-memory notifier for single-process deployments and tests.
- Redis
Config Change Notifier - Redis pub/sub publisher for configuration reload messages.
- Stored
Config - Stored representation of a configuration row.
- Sync
Config Snapshot - Immutable generic snapshot used by synchronous runtime caches.
- Sync
Runtime Config - Synchronous runtime configuration cache.
Enums§
- Config
Change Event - Local event delivered by a notifier.
- Config
Core Error - Error returned by configuration-core helpers.
- Config
Notification Source - Source that emitted a configuration reload notification.
- Config
Reload Decision - Result of handling one reload notification.
- Config
Source - Origin of a stored configuration value.
- Config
Value - API-facing configuration value.
- Config
Value Type - Supported system configuration value types.
- Config
Visibility - Consumer visibility for a stored configuration value.
- Runtime
Config Change - Description of one change applied to a runtime snapshot.
Constants§
- CONFIG_
SYNC_ BACKEND_ DISABLED - Disabled config-sync backend name.
- CONFIG_
SYNC_ BACKEND_ REDIS - Redis pub/sub config-sync backend name.
Traits§
- Async
Config Store - Trait implemented by product storage adapters that can load config rows for
AsyncRuntimeConfig. - Config
Change Notifier - Transport used to publish and subscribe to reload notifications.
- Config
Reload Observer - Receives config reload observability events.
- Config
Sync Connection Observer - Receives config-sync connection lifecycle observations.
- Config
Value Lookup - Lookup used by configuration normalizers and dependency validators.
- Runtime
Config Record - Record type that can be stored in a runtime configuration snapshot.
Functions§
- build_
config_ sync_ runtime - Builds a namespaced config-sync runtime from static config.
- build_
config_ sync_ runtime_ with_ runtime_ id - Builds a namespaced config-sync runtime with an explicit runtime ID.
- config_
value_ audit_ string - Builds an audit-safe string from a stored configuration value.
- decode_
config_ reload_ transport_ payload - Decodes one transport payload into a config reload event.
- default_
config_ sync_ topic - Returns the conventional config-sync topic for a product namespace.
- handle_
config_ reload_ notification - Handles one reload notification by filtering namespace/origin and invoking
reload. - normalize_
bool_ config_ value - Normalizes a bool-like runtime configuration value for storage.
- normalize_
bounded_ u8_ config_ value - Normalizes a bounded
u8runtime configuration value for storage. - normalize_
bounded_ u64_ config_ value - Normalizes a bounded
u64runtime configuration value for storage. - normalize_
finite_ f32_ config_ value - Normalizes a finite
f32runtime configuration value for storage. - normalize_
non_ negative_ u64_ config_ value - Normalizes a non-negative integer runtime configuration value for storage.
- normalize_
positive_ u32_ config_ value - Normalizes a positive
u32runtime configuration value for storage. - normalize_
positive_ u64_ config_ value - Normalizes a positive integer runtime configuration value for storage.
- normalize_
strict_ bool_ config_ value - Normalizes a strict
true/falseruntime configuration value for storage. - normalize_
string_ enum_ set_ selection - Parses and normalizes a string enum set into authoritative order.
- parse_
bool_ like_ value - Parses a bool-like runtime configuration value.
- parse_
bounded_ u8 - Parses a
u8runtime configuration value within an inclusive range. - parse_
bounded_ u64 - Parses a
u64runtime configuration value within an inclusive range. - parse_
finite_ f32 - Parses a finite
f32runtime configuration value. - parse_
non_ negative_ u64 - Parses a non-negative
u64runtime configuration value. - parse_
positive_ i32 - Parses a positive
i32runtime configuration value. - parse_
positive_ u32 - Parses a positive
u32runtime configuration value. - parse_
positive_ u64 - Parses a positive
u64runtime configuration value. - parse_
single_ string_ enum_ selection - Parses a single string enum value with legacy single-item array compatibility.
- parse_
strict_ bool_ value - Parses a strict
true/falseruntime configuration value. - parse_
string_ array_ config_ value - Parses a JSON array of strings stored in a configuration value.
- parse_
string_ enum_ set_ selection - Parses a string enum set from a JSON array of strings.
- present_
config_ value - Builds a configuration value for API presentation.
- read_
bool - Reads a bool-like value from a runtime configuration lookup.
- read_
bounded_ u8 - Reads a bounded
u8from a runtime configuration lookup. - read_
bounded_ u64 - Reads a
u64within an inclusive range from a runtime configuration lookup. - read_
finite_ f32 - Reads a finite
f32from a runtime configuration lookup. - read_
non_ negative_ u64 - Reads a non-negative
u64from a runtime configuration lookup. - read_
positive_ i32 - Reads a positive
i32from a runtime configuration lookup. - read_
positive_ u32 - Reads a positive
u32from a runtime configuration lookup. - read_
positive_ u64 - Reads a positive
u64from a runtime configuration lookup. - read_
positive_ usize - Reads a positive
usizefrom a runtime configuration lookup. - run_
config_ reload_ supervisor - Runs a reconnecting reload subscription with authoritative reconciliation.
- run_
config_ reload_ supervisor_ with_ observers - Runs a reconnecting reload subscription and reports reload and connection observations.
- run_
config_ reload_ worker - Runs a reload subscription loop until
shutdownis cancelled. - run_
config_ reload_ worker_ with_ observer - Runs a reload subscription loop and reports low-cardinality observations.
- validate_
storage_ value - Validates a storage string against a declared value type.
Type Aliases§
- Config
Dependency Validator - Product-owned cross-field validator.
- Config
Normalizer - Product-owned value normalizer.
- Config
Sync Connection State - Connection lifecycle state for a config-sync subscription.
- Result
- Result type returned by configuration-core operations.
- Shared
Config Change Notifier - Shared notifier object used by runtime services.