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

connector: customendpoint for NewAWSReader #54

Merged
merged 1 commit into from
May 11, 2020
Merged

connector: customendpoint for NewAWSReader #54

merged 1 commit into from
May 11, 2020

Conversation

talset
Copy link
Member

@talset talset commented Apr 30, 2020

Workaround to use min.io or other compatible service as s3 backend
Set customEndpoint = true to indicate that we are not using aws services.

@coveralls
Copy link

coveralls commented Apr 30, 2020

Coverage Status

Coverage decreased (-1.06%) to 65.064% when pulling aa4898a on fl-minio into c86b87c on master.

@talset talset changed the title connector: minio flag for NewAWSReader connector: customendpoint flag for NewAWSReader May 4, 2020
connector.go Outdated Show resolved Hide resolved
connector.go Outdated Show resolved Hide resolved
connector.go Outdated
@@ -53,17 +53,32 @@ func NewAWSReader(
ctx context.Context, accessKey string, secretKey string, regions []string, config *aws.Config,
) (AWSReader, error) {
var c = connector{}
const customEndpointRegion string = "custom"
Copy link
Member

Choose a reason for hiding this comment

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

I meant to have a raws.CustomRegion basically, so it's something anyone using the lib can use to flag that instead of using a direct "custom" which is "worse".

@talset talset changed the title connector: customendpoint flag for NewAWSReader connector: customendpoint for NewAWSReader May 5, 2020
@talset talset force-pushed the fl-minio branch 2 times, most recently from 5b36a45 to c6bbcb1 Compare May 6, 2020 07:36
@@ -50,20 +50,25 @@ import (
// * https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html#CommonErrors
// * https://docs.aws.amazon.com/STS/latest/APIReference/CommonErrors.html
func NewAWSReader(
ctx context.Context, accessKey string, secretKey string, regions []string, config *aws.Config,
) (AWSReader, error) {
ctx context.Context, accessKey string, secretKey string, regions []string, config *aws.Config, customEndpoint bool) (AWSReader, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Document on this method what the customEndpoint is on the params

@@ -50,20 +50,25 @@ import (
// * https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html#CommonErrors
// * https://docs.aws.amazon.com/STS/latest/APIReference/CommonErrors.html
func NewAWSReader(
ctx context.Context, accessKey string, secretKey string, regions []string, config *aws.Config,
) (AWSReader, error) {
ctx context.Context, accessKey string, secretKey string, regions []string, config *aws.Config, customEndpoint bool) (AWSReader, error) {
Copy link
Member

Choose a reason for hiding this comment

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

So goo docs but I want them also on the function description of NewAWSReader hehe

Workaround to use min.io or other compatible service as s3 backend
Set customEndpoint = true  to indicate that we are not using
aws services.
@talset talset merged commit 85f3a51 into master May 11, 2020
@talset talset deleted the fl-minio branch May 11, 2020 09:42
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

3 participants