Skip to main content

load_config_from_kv

Function load_config_from_kv 

Source
pub(crate) async fn load_config_from_kv(
    store: &Store,
    key: &str,
) -> Result<SampleConfig, LJMError>
Expand description

Loads and parses the initial streamer configuration from local NATS KV.

§Arguments

  • store - Local KV bucket.
  • key - Configuration key.

§Errors

Returns an error if the key does not exist, the KV read fails, or the value does not parse (see sample_config_from_json).