ddbexportpoller

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2022 License: MIT Imports: 14 Imported by: 0

README

status PkgGoDev

dynamodb-export-poller

You can export DynamoDB table data to S3 but its job takes few minutes and currently it emits no events.

This tool just waits given DynamoDB table's export job finishes.

Synopsis

go run github.com/aereal/dynamodb-export-poller/cmd/dynamodb-export-poller -table-arn arn:aws:...

Mandatory argument is only -table-arn. Run -help and you can review other optional arguments.

Installation

go install github.com/aereal/dynamodb-export-poller/cmd/dynamodb-export-poller

License

See LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTableArnRequired is an error that means mandatory table ARN is not passed
	ErrTableArnRequired = errors.New("table ARN required")

	ErrConcurrencyMustBePositive = errors.New("concurrency must greater than 0")

	ErrInfiniteRetries = errors.New("maxAttempts must be limited")
)

Functions

This section is empty.

Types

type Poller

type Poller struct {
	// contains filtered or unexported fields
}

func NewPoller

func NewPoller(options PollerOptions) (*Poller, error)

NewPoller creates new Poller.

An error may be returned if you passed invalid options.

func (*Poller) PollExports

func (p *Poller) PollExports(ctx context.Context) error

PollExports polls ongoing export job status changes.

You can configure polling behaviors through PollerOptions.

type PollerOptions

type PollerOptions struct {
	// TableArn is an ARN of the table that the poller waits for export jobs
	TableArn string

	// InitialDelay is used for first interval
	InitialDelay time.Duration

	// MaxDelay is maximum interval for each requests
	MaxDelay time.Duration

	// MaxAttempts is a number to send export job status check requests
	MaxAttempts int

	Concurrency int64

	// Timeout is used for all export job status check requests. No requests are sent over this timeout.
	Timeout time.Duration
}

PollerOptions is a set of Poller's options

Directories

Path Synopsis
cmd
internal
ddb
Package ddb is a generated GoMock package.
Package ddb is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL