pub struct Overrides {
pub kibana_url: Option<String>,
pub es_url: Option<String>,
pub api_key: Option<String>,
pub space: Option<String>,
pub timeout_secs: Option<u64>,
}Fields§
§kibana_url: Option<String>§es_url: Option<String>§api_key: Option<String>§space: Option<String>§timeout_secs: Option<u64>Implementations§
Source§impl Overrides
impl Overrides
Sourcepub fn from_env() -> Overrides
pub fn from_env() -> Overrides
Read ELASTICCTL_* environment variables as overrides.
es_url and kibana_url are identity overrides. Cloud deployments use
distinct endpoints; inheriting one from a saved profile could target two
deployments and send the overridden credential to the wrong host.
Sourcepub fn try_from_env() -> Result<Overrides>
pub fn try_from_env() -> Result<Overrides>
Read ELASTICCTL_* environment variables as overrides, failing on
invalid input.
Unlike from_env, this distinguishes an absent variable from invalid
Unicode and rejects a non-integer timeout instead of silently dropping
it.
Sourcepub fn try_from_env_with_flags(flags: &Overrides) -> Result<Overrides>
pub fn try_from_env_with_flags(flags: &Overrides) -> Result<Overrides>
Read ELASTICCTL_* as overrides, failing on invalid input for every
field the given flags do not already override.
A flag overrides its environment variable, so a stale invalid value in
an overridden field must not fail the command. Context::build passes
the CLI flags here; config init --from-env uses the strict
try_from_env because the environment is its source of truth.
Sourcepub fn merge_over(self, lower: Overrides) -> Overrides
pub fn merge_over(self, lower: Overrides) -> Overrides
Merge overrides, preferring self over lower.