Skip to content

Commit d7be220

Browse files
jdisantiysaito1001
andauthored
Make the use_dualstack provider public (#3611)
Addresses awslabs/aws-sdk-rust#879 ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: ysaito1001 <awsaito@amazon.com>
1 parent 2c5e37e commit d7be220

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

CHANGELOG.next.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,9 @@ message = "Fix event stream `:content-type` message headers for struct messages.
6464
references = ["smithy-rs#3603"]
6565
meta = { "breaking" = false, "tada" = false, "bug" = true, "target" = "all" }
6666
author = "jdisanti"
67+
68+
[[aws-sdk-rust]]
69+
message = "`aws_config::default_provider::use_dual_stack_provider` is now public instead of `pub(crate)`"
70+
references = ["aws-sdk-rust#879", "smithy-rs#3611"]
71+
meta = { "breaking" = false, "tada" = false, "bug" = false }
72+
author = "jdisanti"

aws/rust-runtime/aws-config/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aws-config"
3-
version = "1.2.1"
3+
version = "1.3.0"
44
authors = [
55
"AWS Rust SDK Team <aws-sdk-rust@amazon.com>",
66
"Russell Cohen <rcoh@amazon.com>",

aws/rust-runtime/aws-config/src/default_provider/use_dual_stack.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ mod profile_key {
1616
pub(super) const USE_DUAL_STACK: &str = "use_dualstack_endpoint";
1717
}
1818

19-
pub(crate) async fn use_dual_stack_provider(provider_config: &ProviderConfig) -> Option<bool> {
19+
/// Load the value for "use dual-stack"
20+
///
21+
/// This checks the following sources:
22+
/// 1. The environment variable `AWS_USE_DUALSTACK_ENDPOINT=true/false`
23+
/// 2. The profile key `use_dualstack_endpoint=true/false`
24+
///
25+
/// If invalid values are found, the provider will return `None` and an error will be logged.
26+
pub async fn use_dual_stack_provider(provider_config: &ProviderConfig) -> Option<bool> {
2027
let env = provider_config.env();
2128
let profiles = provider_config.profile().await;
2229

0 commit comments

Comments
 (0)