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

Allow for overiding the AWS region for Kinesis #12

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ type Config struct {
// FlushInterval is a regular interval for flushing the buffer. Defaults to 1s.
FlushInterval time.Duration

// (optional) Override the AWS region.
Region string

// BufferSize determines the batch request size. Must not exceed 500. Defaults to 500.
BufferSize int

Expand All @@ -41,7 +44,7 @@ type Config struct {
// defaults for configuration.
func (c *Config) defaults() {
if c.Client == nil {
c.Client = k.New(session.New(aws.NewConfig()))
c.Client = k.New(session.New(aws.NewConfig().WithRegion(c.Region)))
}

if c.Logger == nil {
Expand Down