strategy

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mnt2Strategy  = "mnt2"
	SvcStrategy   = "svc"
	LbSvcStrategy = "lbsvc"
	LocalStrategy = "local"
)

Variables

View Source
var (
	DefaultStrategies = []string{Mnt2Strategy, SvcStrategy, LbSvcStrategy}
	AllStrategies     = []string{Mnt2Strategy, SvcStrategy, LbSvcStrategy, LocalStrategy}

	ErrUnaccepted = errors.New("unaccepted")
)

Functions

func GetStrategiesMapForNames

func GetStrategiesMapForNames(names []string) (map[string]Strategy, error)

Types

type LbSvc

type LbSvc struct{}

func (*LbSvc) Run

func (r *LbSvc) Run(ctx context.Context, attempt *migration.Attempt) error

type Local

type Local struct{}

func (*Local) Run

func (r *Local) Run(ctx context.Context, attempt *migration.Attempt) error

type Mnt2

type Mnt2 struct{}

func (*Mnt2) Run

func (r *Mnt2) Run(ctx context.Context, attempt *migration.Attempt) error

type Strategy

type Strategy interface {
	// Run runs the migration for the given task execution.
	//
	// This is the actual implementation of the migration.
	Run(ctx context.Context, a *migration.Attempt) error
}

type Svc

type Svc struct{}

func (*Svc) Run

func (r *Svc) Run(ctx context.Context, attempt *migration.Attempt) error

Jump to

Keyboard shortcuts

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