Skip to main content

Crate aster_forge_config

Crate aster_forge_config 

Source
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 ConfigRegistry from a list of ConfigDefinition items.

Structs§

AsyncConfigSnapshot
Immutable snapshot exposed by AsyncRuntimeConfig.
AsyncRuntimeConfig
Async runtime configuration cache.
ConfigDefinition
Product-owned metadata for one configuration key.
ConfigNotification
Subscription returned by config notifiers.
ConfigRegistry
Static registry of product configuration definitions.
ConfigReloadMessage
Notification payload published after configuration changes.
ConfigReloadObservation
Observability event emitted after handling a config reload notification.
ConfigReloadWorkerConfig
Runtime reload worker configuration.
ConfigSeedRecord
Seed row produced from a registry definition.
ConfigSyncConfig
Static configuration for cross-process config reload synchronization.
ConfigSyncConnectionObservation
Low-cardinality observation emitted for config-sync connection transitions.
ConfigSyncRuntime
Namespaced runtime handle for cross-process config synchronization.
InMemoryConfigNotifier
In-memory notifier for single-process deployments and tests.
RedisConfigChangeNotifier
Redis pub/sub publisher for configuration reload messages.
StoredConfig
Stored representation of a configuration row.
SyncConfigSnapshot
Immutable generic snapshot used by synchronous runtime caches.
SyncRuntimeConfig
Synchronous runtime configuration cache.

Enums§

ConfigChangeEvent
Local event delivered by a notifier.
ConfigCoreError
Error returned by configuration-core helpers.
ConfigNotificationSource
Source that emitted a configuration reload notification.
ConfigReloadDecision
Result of handling one reload notification.
ConfigSource
Origin of a stored configuration value.
ConfigValue
API-facing configuration value.
ConfigValueType
Supported system configuration value types.
ConfigVisibility
Consumer visibility for a stored configuration value.
RuntimeConfigChange
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§

AsyncConfigStore
Trait implemented by product storage adapters that can load config rows for AsyncRuntimeConfig.
ConfigChangeNotifier
Transport used to publish and subscribe to reload notifications.
ConfigReloadObserver
Receives config reload observability events.
ConfigSyncConnectionObserver
Receives config-sync connection lifecycle observations.
ConfigValueLookup
Lookup used by configuration normalizers and dependency validators.
RuntimeConfigRecord
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 u8 runtime configuration value for storage.
normalize_bounded_u64_config_value
Normalizes a bounded u64 runtime configuration value for storage.
normalize_finite_f32_config_value
Normalizes a finite f32 runtime 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 u32 runtime 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/false runtime 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 u8 runtime configuration value within an inclusive range.
parse_bounded_u64
Parses a u64 runtime configuration value within an inclusive range.
parse_finite_f32
Parses a finite f32 runtime configuration value.
parse_non_negative_u64
Parses a non-negative u64 runtime configuration value.
parse_positive_i32
Parses a positive i32 runtime configuration value.
parse_positive_u32
Parses a positive u32 runtime configuration value.
parse_positive_u64
Parses a positive u64 runtime 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/false runtime 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 u8 from a runtime configuration lookup.
read_bounded_u64
Reads a u64 within an inclusive range from a runtime configuration lookup.
read_finite_f32
Reads a finite f32 from a runtime configuration lookup.
read_non_negative_u64
Reads a non-negative u64 from a runtime configuration lookup.
read_positive_i32
Reads a positive i32 from a runtime configuration lookup.
read_positive_u32
Reads a positive u32 from a runtime configuration lookup.
read_positive_u64
Reads a positive u64 from a runtime configuration lookup.
read_positive_usize
Reads a positive usize from 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 shutdown is 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§

ConfigDependencyValidator
Product-owned cross-field validator.
ConfigNormalizer
Product-owned value normalizer.
ConfigSyncConnectionState
Connection lifecycle state for a config-sync subscription.
Result
Result type returned by configuration-core operations.
SharedConfigChangeNotifier
Shared notifier object used by runtime services.