Skip to content

Commit

Permalink
Update configuration.md and improve config env.mapping list. (#3020)
Browse files Browse the repository at this point in the history
* Update configuration.md and improve config env.mapping list.

* schema

* try new line

* changelog
  • Loading branch information
meowjesty authored Jan 20, 2025
1 parent 36bfd3c commit db82881
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions changelog.d/+improve-env-config-docs.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update configuration.md and improve config env.mapping list.
2 changes: 1 addition & 1 deletion mirrord-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@
},
"mapping": {
"title": "feature.env.mapping {#feature-env-mapping}",
"description": "Specify map of patterns that if matched will replace the value according to specification.\n\n*Capture groups are allowed.*\n\nExample: ```json { \".+_TIMEOUT\": \"10000\" \"LOG_.+_VERBOSITY\": \"debug\" \"(\\w+)_(\\d+)\": \"magic-value\" } ```\n\nWill do the next replacements for environment variables that match:\n\n`CONNECTION_TIMEOUT: 500` => `CONNECTION_TIMEOUT: 10000` `LOG_FILE_VERBOSITY: info` => `LOG_FILE_VERBOSITY: debug` `DATA_1234: common-value` => `DATA_1234: magic-value`",
"description": "Specify map of patterns that if matched will replace the value according to specification.\n\n*Capture groups are allowed.*\n\nExample: ```json { \".+_TIMEOUT\": \"10000\" \"LOG_.+_VERBOSITY\": \"debug\" \"(\\w+)_(\\d+)\": \"magic-value\" } ```\n\nWill do the next replacements for environment variables that match:\n\n* `CONNECTION_TIMEOUT: 500` => `CONNECTION_TIMEOUT: 10000`\n\n* `LOG_FILE_VERBOSITY: info` => `LOG_FILE_VERBOSITY: debug`\n\n* `DATA_1234: common-value` => `DATA_1234: magic-value`",
"type": [
"object",
"null"
Expand Down
8 changes: 5 additions & 3 deletions mirrord/config/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -729,9 +729,11 @@ Example:

Will do the next replacements for environment variables that match:

`CONNECTION_TIMEOUT: 500` => `CONNECTION_TIMEOUT: 10000`
`LOG_FILE_VERBOSITY: info` => `LOG_FILE_VERBOSITY: debug`
`DATA_1234: common-value` => `DATA_1234: magic-value`
* `CONNECTION_TIMEOUT: 500` => `CONNECTION_TIMEOUT: 10000`

* `LOG_FILE_VERBOSITY: info` => `LOG_FILE_VERBOSITY: debug`

* `DATA_1234: common-value` => `DATA_1234: magic-value`

### feature.env.override {#feature-env-override}

Expand Down
8 changes: 5 additions & 3 deletions mirrord/config/src/feature/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,11 @@ pub struct EnvConfig {
///
/// Will do the next replacements for environment variables that match:
///
/// `CONNECTION_TIMEOUT: 500` => `CONNECTION_TIMEOUT: 10000`
/// `LOG_FILE_VERBOSITY: info` => `LOG_FILE_VERBOSITY: debug`
/// `DATA_1234: common-value` => `DATA_1234: magic-value`
/// * `CONNECTION_TIMEOUT: 500` => `CONNECTION_TIMEOUT: 10000`
///
/// * `LOG_FILE_VERBOSITY: info` => `LOG_FILE_VERBOSITY: debug`
///
/// * `DATA_1234: common-value` => `DATA_1234: magic-value`
pub mapping: Option<HashMap<String, String>>,
}

Expand Down

0 comments on commit db82881

Please sign in to comment.