upgrade

package
v0.4.1-RC2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunUpgrade

func RunUpgrade(tasks ...Task) error

RunUpgrade runs all the upgrade tasks required

Types

type PreUpgrade

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

PreUpgrade is the struct which implements the UpgradeTask interface which can be used to perform the upgrade

func NewPreUpgradeTask

func NewPreUpgradeTask(from, to string, c client.Client) *PreUpgrade

NewPreUpgradeTask creates a new preupgrade with given client and specified `from` and `to` version

func (*PreUpgrade) FromVersion

func (p *PreUpgrade) FromVersion() string

FromVersion returns the version from which the components need to be updated

func (*PreUpgrade) IsSuccess

func (p *PreUpgrade) IsSuccess() error

IsSuccess returns error if the upgrade failed, at any step. Else nil will be returned

func (*PreUpgrade) PostUpgrade

func (p *PreUpgrade) PostUpgrade() bool

PostUpgrade runs the tasks that need to be performed after upgrade and returns whether the tasks where success or not

func (*PreUpgrade) PreUpgrade

func (p *PreUpgrade) PreUpgrade() bool

PreUpgrade runs the preupgrade tasks and returns whether it succeeded or not

func (*PreUpgrade) ToVersion

func (p *PreUpgrade) ToVersion() string

ToVersion returns the version to which components will be updated. This should be the current version

func (*PreUpgrade) Upgrade

func (p *PreUpgrade) Upgrade() bool

Upgrade runs the main upgrade tasks and returns whether it succeeded or not

type Task

type Task interface {
	FromVersion() string
	ToVersion() string
	IsSuccess() error
	PreUpgrade() bool
	Upgrade() bool
	PostUpgrade() bool
}

Task interfaces gives a set of methods to be implemented for performing an upgrade

Jump to

Keyboard shortcuts

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