Skip to content

Commit e57fae8

Browse files
authored
Base environment configuration module (#931)
* The base envconfig module to be used by lang-SDKs * linting * add pr review - use enum for path/data inputs, validate against providing both, read env vars from hashmap instead of trait env lookup * formatting & linting
1 parent 17f424c commit e57fae8

File tree

3 files changed

+1559
-0
lines changed

3 files changed

+1559
-0
lines changed

core-api/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,20 @@ categories = ["development-tools"]
1414

1515
[features]
1616
otel_impls = ["dep:opentelemetry"]
17+
envconfig = ["dep:toml", "dep:serde", "dep:dirs", "dep:anyhow"]
1718

1819
[dependencies]
20+
anyhow = { version = "1.0", optional = true }
1921
async-trait = "0.1"
22+
dirs = { version = "5.0", optional = true }
2023
derive_builder = { workspace = true }
2124
derive_more = { workspace = true }
2225
opentelemetry = { workspace = true, optional = true }
2326
prost = { workspace = true }
27+
serde = { version = "1.0", features = ["derive"], optional = true }
2428
serde_json = "1.0"
2529
thiserror = { workspace = true }
30+
toml = { version = "0.8", optional = true }
2631
tonic = { workspace = true }
2732
tracing-core = "0.1"
2833
url = "2.3"
@@ -33,3 +38,6 @@ version = "0.1"
3338

3439
[lints]
3540
workspace = true
41+
42+
[dev-dependencies]
43+
tempfile = "3.8"

0 commit comments

Comments
 (0)