Skip to content

Commit

Permalink
Add constructor from session. (#56)
Browse files Browse the repository at this point in the history
* Add constructor from session.
* changelog
* Adding changelog file to new location
* Deleting changelog file from old location
* Merge branch 'master' into eks-client-from-session
  • Loading branch information
harveyxia authored Jun 12, 2020
1 parent 08ef97f commit de81885
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog/v0.4.1/eks-client-from-session.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changelog:
- type: NEW_FEATURE
description: Expose EksClient constructor from session, allowing users to configure AWS client settings.
issueLink: https://github.com/solo-io/skv2/issues/57
7 changes: 7 additions & 0 deletions pkg/multicluster/discovery/cloud/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ func NewEksClient(region string, creds *credentials.Credentials) (EksClient, err
}, nil
}

// Construct client from preconfigured session.
func NewEksClientFromSession(sess *session.Session) EksClient {
return &awsClient{
sess: sess,
}
}

type awsClient struct {
sess *session.Session
}
Expand Down

0 comments on commit de81885

Please sign in to comment.