Merged in feature/semver (pull request #93)
Add semantic versioning to all services * working * Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/semver * 1.24 mod * go upgrade * tool * Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/semver
This commit is contained in:
+12
@@ -47,6 +47,10 @@ type Options struct {
|
||||
//
|
||||
// If nil, the provider will default to the EC2 IMDS client.
|
||||
Client GetMetadataAPIClient
|
||||
|
||||
// The chain of providers that was used to create this provider
|
||||
// These values are for reporting purposes and are not meant to be set up directly
|
||||
CredentialSources []aws.CredentialSource
|
||||
}
|
||||
|
||||
// New returns an initialized Provider value configured to retrieve
|
||||
@@ -227,3 +231,11 @@ func requestCred(ctx context.Context, client GetMetadataAPIClient, credsName str
|
||||
|
||||
return respCreds, nil
|
||||
}
|
||||
|
||||
// ProviderSources returns the credential chain that was used to construct this provider
|
||||
func (p *Provider) ProviderSources() []aws.CredentialSource {
|
||||
if p.options.CredentialSources == nil {
|
||||
return []aws.CredentialSource{aws.CredentialSourceIMDS}
|
||||
} // If no source has been set, assume this is used directly which means just call to assume role
|
||||
return p.options.CredentialSources
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user