Skip to content

Commit

Permalink
Add proper documentation for EndpointURL
Browse files Browse the repository at this point in the history
  • Loading branch information
Suraj Barkale authored and Suraj Barkale committed Oct 17, 2018
1 parent c11976b commit 4589f73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion config/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ type (
RoleARN string `envconfig:"AWS_ROLE_ARN"`
SecretKey string `envconfig:"AWS_SECRET_KEY"`
SessionToken string `envconfig:"AWS_SESSION_TOKEN"`
Endpoint *string // Must be overridden separately for each service
// Endpoint is an optional endpoint URL (hostname only or fully qualified URI)
// that overrides the default endpoint for a client. Leave the value as "nil"
// to use the default endpoint. Currently, only the gizmo SNS Publisher is
// using this value. Note that AWS emulators (such as localstack) often have
// different endpoint URL for each emulated service.
EndpointURL *string `envconfig:"AWS_ENDPOINT_URL"`
}

// S3 holds the info required to work with Amazon S3.
Expand Down
2 changes: 1 addition & 1 deletion pubsub/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func NewPublisher(cfg SNSConfig) (pubsub.Publisher, error) {
p.sns = sns.New(sess, &aws.Config{
Credentials: creds,
Region: &cfg.Region,
Endpoint: cfg.Endpoint,
Endpoint: cfg.EndpointURL,
})
return p, nil
}
Expand Down

0 comments on commit 4589f73

Please sign in to comment.