Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use data source instance HTTP options in AWS sessions #42

Merged
merged 2 commits into from
Jan 14, 2022

Conversation

andresmgot
Copy link
Contributor

@andresmgot andresmgot commented Jan 13, 2022

GetSession now accepts the data source configuration and it's used to obtain HTTP client options.

We were already using different parameters: the region, the default region, the AWS settings, the user agent... I gathered all those in a single struct that is now the only parameter for GetSession. This simplification implies a breaking change though.

First step of #39089

@andresmgot andresmgot requested review from sunker, a team, yaelleC and iwysiu and removed request for a team January 13, 2022 15:53
Copy link
Contributor

@iwysiu iwysiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

return sessionCache.GetSession(region, settings)
}

func WithUserAgent(sess *session.Session, name string) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call adding this to the constructor!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants