Skip to content

Commit

Permalink
feat: Allow to use OPENDAL_HOT_* and OPENDAL_COLD_* env variables (#1392
Browse files Browse the repository at this point in the history
)

closes #1391
  • Loading branch information
aawsome authored Jan 2, 2025
1 parent a789b50 commit d1b11f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ impl Configurable<RusticConfig> for EntryPoint {
} else if let Some(var) = var.strip_prefix("RUSTIC_REPO_OPTCOLD_") {
let var = var.from_case(Case::UpperSnake).to_case(Case::Kebab);
_ = config.repository.be.options_cold.insert(var, value);
} else if let Some(var) = var.strip_prefix("OPENDAL_HOT_") {
let var = var.from_case(Case::UpperSnake).to_case(Case::Snake);
_ = config.repository.be.options_hot.insert(var, value);
} else if let Some(var) = var.strip_prefix("OPENDAL_COLD_") {
let var = var.from_case(Case::UpperSnake).to_case(Case::Snake);
_ = config.repository.be.options_cold.insert(var, value);
}
}

Expand Down

0 comments on commit d1b11f9

Please sign in to comment.