chore: Add CONTINUWUITY_ environment variables
Also updates some examples to match
This commit is contained in:
parent
c0f46269b5
commit
5577ddca27
5 changed files with 34 additions and 14 deletions
|
@ -1962,7 +1962,11 @@ impl Config {
|
|||
where
|
||||
I: Iterator<Item = &'a Path>,
|
||||
{
|
||||
let envs = [Env::var("CONDUIT_CONFIG"), Env::var("CONDUWUIT_CONFIG")];
|
||||
let envs = [
|
||||
Env::var("CONDUIT_CONFIG"),
|
||||
Env::var("CONDUWUIT_CONFIG"),
|
||||
Env::var("CONTINUWUITY_CONFIG"),
|
||||
];
|
||||
|
||||
let config = envs
|
||||
.into_iter()
|
||||
|
@ -1971,7 +1975,8 @@ impl Config {
|
|||
.chain(paths.map(Toml::file))
|
||||
.fold(Figment::new(), |config, file| config.merge(file.nested()))
|
||||
.merge(Env::prefixed("CONDUIT_").global().split("__"))
|
||||
.merge(Env::prefixed("CONDUWUIT_").global().split("__"));
|
||||
.merge(Env::prefixed("CONDUWUIT_").global().split("__"))
|
||||
.merge(Env::prefixed("CONTINUWUITY_").global().split("__"));
|
||||
|
||||
Ok(config)
|
||||
}
|
||||
|
|
|
@ -74,17 +74,30 @@ pub(crate) struct Args {
|
|||
/// with the exception of the last bucket, try increasing this value to e.g.
|
||||
/// 50 or 100. Inversely, decrease to 10 etc if the histogram lacks
|
||||
/// resolution.
|
||||
#[arg(long, hide(true), env = "CONDUWUIT_RUNTIME_HISTOGRAM_INTERVAL", default_value = "25")]
|
||||
#[arg(
|
||||
long,
|
||||
hide(true),
|
||||
env = "CONTINUWUITY_RUNTIME_HISTOGRAM_INTERVAL",
|
||||
env = "CONDUWUIT_RUNTIME_HISTOGRAM_INTERVAL",
|
||||
default_value = "25"
|
||||
)]
|
||||
pub(crate) worker_histogram_interval: u64,
|
||||
|
||||
/// Set the histogram bucket count (tokio_unstable). Default is 20.
|
||||
#[arg(long, hide(true), env = "CONDUWUIT_RUNTIME_HISTOGRAM_BUCKETS", default_value = "20")]
|
||||
#[arg(
|
||||
long,
|
||||
hide(true),
|
||||
env = "CONTINUWUITY_RUNTIME_HISTOGRAM_BUCKETS",
|
||||
env = "CONDUWUIT_RUNTIME_HISTOGRAM_BUCKETS",
|
||||
default_value = "20"
|
||||
)]
|
||||
pub(crate) worker_histogram_buckets: usize,
|
||||
|
||||
/// Toggles worker affinity feature.
|
||||
#[arg(
|
||||
long,
|
||||
hide(true),
|
||||
env = "CONTINUWUITY_RUNTIME_WORKER_AFFINITY",
|
||||
env = "CONDUWUIT_RUNTIME_WORKER_AFFINITY",
|
||||
action = ArgAction::Set,
|
||||
num_args = 0..=1,
|
||||
|
@ -99,6 +112,7 @@ pub(crate) struct Args {
|
|||
#[arg(
|
||||
long,
|
||||
hide(true),
|
||||
env = "CONTINUWUITY_RUNTIME_GC_ON_PARK",
|
||||
env = "CONDUWUIT_RUNTIME_GC_ON_PARK",
|
||||
action = ArgAction::Set,
|
||||
num_args = 0..=1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue