Crate saluki_config

Crate saluki_config 

Source
Expand description

Primitives for working with typed and untyped configuration data.

Re-exports§

pub use self::duration_string::DurationString;
pub use self::dynamic::FieldUpdateWatcher;
pub use self::space_separated::deserialize_opt_space_separated_or_seq;
pub use self::space_separated::deserialize_space_separated_or_seq;

Modules§

duration_string
A duration configuration value compatible with the Agent.
dynamic
Dynamic configuration.
space_separated
Serde deserializer for space-separated string lists.
value
Value and friends: types representing valid configuration values.

Structs§

ConfigurationLoader
A configuration loader that can pull from various sources.
GenericConfiguration
A generic configuration object.

Enums§

ConfigurationError
A configuration error.
ParseDurationError
Error returned when a duration string can’t be parsed.

Functions§

config_from
Builds a GenericConfiguration from an in-memory JSON body, for use in tests.
parse_duration
Parses a string in the exact format accepted by Go’s time.ParseDuration, restricted to non-negative values (since std::time::Duration can’t represent negatives).
test_env_lock
Acquires the process-global lock that serializes tests which mutate environment variables while loading configuration, returning the held guard.
upsert
Inserts or updates a value for a key.