config

package
v0.0.0-...-2bcf1be Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MaxRetries int = 15

Variables

View Source
var (
	ErrInputRegionRequired    = errors.New("Input region is required")
	ErrInputTableNameRequired = errors.New("Input table name is required")

	ErrOutputRegionRequired    = errors.New("Output region is required")
	ErrOutputTableNameRequired = errors.New("Output table name is required")

	ErrInputAndOutputTablesCannotMatch = errors.New("Input and output tables cannot match")

	ErrBackfillSegmentConfiguration       = errors.New("Backfill segment configuration is invalid")
	ErrBackfillTotalSegmentsConfiguration = errors.New("Backfill total segments configuration is invalid")
	ErrStreamCannotRunWithSegmentedScan   = errors.New("Stream must be disabled if scan segment target is specified")
)

Functions

This section is empty.

Types

type Backfill

type Backfill struct {
	Disabled      bool  `yaml:"disabled"`
	Segments      []int `yaml:"segments"`
	TotalSegments int   `yaml:"total_segments"`
}

type Input

type Input struct {
	Region    string `yaml:"region"`
	TableName string `yaml:"table"`

	RoleARN string `yaml:"role_arn"`
}

type OperationPlan

type OperationPlan struct {
	Input Input `yaml:"input"`

	Output Output `yaml:"output"`

	Backfill Backfill `yaml:"backfill"`

	Stream Stream `yaml:"stream"`
}

func ParseConfigFile

func ParseConfigFile(filePath string) ([]OperationPlan, error)

func (OperationPlan) Description

func (p OperationPlan) Description() string

Description returns a description of the operation input/output "InputTableName => OutputTableName:"

func (OperationPlan) GetSessions

func (p OperationPlan) GetSessions() (*session.Session, *session.Session, error)

func (OperationPlan) Validate

func (p OperationPlan) Validate() error

func (OperationPlan) WithDefaults

func (p OperationPlan) WithDefaults() OperationPlan

type Output

type Output struct {
	Region    string `yaml:"region"` // defaults to the Input region
	TableName string `yaml:"table"`  // defaults to the Input table name

	RoleARN string `yaml:"role_arn"`
}

type PlanConfig

type PlanConfig struct {
	Plan []OperationPlan `yaml:"plan"`
}

type Stream

type Stream struct {
	Disabled bool `yaml:"disabled"`
}

Jump to

Keyboard shortcuts

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