-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
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" |
There was a problem hiding this comment.
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".
5b36a45
to
c6bbcb1
Compare
@@ -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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
Workaround to use min.io or other compatible service as s3 backend
Set customEndpoint = true to indicate that we are not using aws services.