migrator

package
v0.0.0-...-8e6450d Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParallelMigrate

func ParallelMigrate(migrators ...func())

Types

type ActivityTypeMigrator

type ActivityTypeMigrator struct {
	RegisteredActivityTypes []swf.RegisterActivityTypeInput
	DeprecatedActivityTypes []swf.DeprecateActivityTypeInput
	Client                  SWFOps
}

ActivityTypeMigrator will register or deprecate the configured activity types as required.

func (*ActivityTypeMigrator) Migrate

func (a *ActivityTypeMigrator) Migrate()

Migrate asserts that DeprecatedActivityTypes are deprecated or deprecates them, then asserts that RegisteredActivityTypes are registered or registers them.

type DomainMigrator

type DomainMigrator struct {
	RegisteredDomains []swf.RegisterDomainInput
	DeprecatedDomains []swf.DeprecateDomainInput
	Client            SWFOps
}

DomainMigrator will register or deprecate the configured domains as required.

func (*DomainMigrator) Migrate

func (d *DomainMigrator) Migrate()

Migrate asserts that DeprecatedDomains are deprecated or deprecates them, then asserts that RegisteredDomains are registered or registers them.

type KinesisOps

type KinesisOps interface {
	CreateStream(req *kinesis.CreateStreamInput) (*kinesis.CreateStreamOutput, error)
	DescribeStream(req *kinesis.DescribeStreamInput) (*kinesis.DescribeStreamOutput, error)
}

type StreamMigrator

type StreamMigrator struct {
	Streams []kinesis.CreateStreamInput
	Client  KinesisOps
	Timeout int
}

StreamMigrator will create any Kinesis Streams required.

func (*StreamMigrator) Migrate

func (s *StreamMigrator) Migrate()

Migrate checks that the desired streams have been created and if they have not, creates them.s

type TypesMigrator

type TypesMigrator struct {
	DomainMigrator       *DomainMigrator
	WorkflowTypeMigrator *WorkflowTypeMigrator
	ActivityTypeMigrator *ActivityTypeMigrator
	StreamMigrator       *StreamMigrator
}

TypesMigrator is composed of a DomainMigrator, a WorkflowTypeMigrator and an ActivityTypeMigrator.

func (*TypesMigrator) Migrate

func (t *TypesMigrator) Migrate()

Migrate runs Migrate on the underlying DomainMigrator, a WorkflowTypeMigrator and ActivityTypeMigrator.

type WorkflowTypeMigrator

type WorkflowTypeMigrator struct {
	RegisteredWorkflowTypes []swf.RegisterWorkflowTypeInput
	DeprecatedWorkflowTypes []swf.DeprecateWorkflowTypeInput
	Client                  SWFOps
}

WorkflowTypeMigrator will register or deprecate the configured workflow types as required.

func (*WorkflowTypeMigrator) Migrate

func (w *WorkflowTypeMigrator) Migrate()

Migrate asserts that DeprecatedWorkflowTypes are deprecated or deprecates them, then asserts that RegisteredWorkflowTypes are registered or registers them.

Jump to

Keyboard shortcuts

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