Unverified Commit d7be2202 authored by John DiSanti's avatar John DiSanti Committed by GitHub
Browse files

Make the `use_dualstack` provider public (#3611)

Addresses https://github.com/awslabs/aws-sdk-rust/issues/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: default avatarysaito1001 <awsaito@amazon.com>
parent 2c5e37e9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -64,3 +64,9 @@ message = "Fix event stream `:content-type` message headers for struct messages.
references = ["smithy-rs#3603"]
meta = { "breaking" = false, "tada" = false, "bug" = true, "target" = "all" }
author = "jdisanti"

[[aws-sdk-rust]]
message = "`aws_config::default_provider::use_dual_stack_provider` is now public instead of `pub(crate)`"
references = ["aws-sdk-rust#879", "smithy-rs#3611"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "jdisanti"
+1 −1
Original line number Diff line number Diff line
[package]
name = "aws-config"
version = "1.2.1"
version = "1.3.0"
authors = [
    "AWS Rust SDK Team <aws-sdk-rust@amazon.com>",
    "Russell Cohen <rcoh@amazon.com>",
+8 −1
Original line number Diff line number Diff line
@@ -16,7 +16,14 @@ mod profile_key {
    pub(super) const USE_DUAL_STACK: &str = "use_dualstack_endpoint";
}

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