Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Phase ¶
type Phase int
Phase values specify model migration phases.
const ( UNKNOWN Phase = iota NONE QUIESCE READONLY PRECHECK IMPORT VALIDATION SUCCESS LOGTRANSFER REAP REAPFAILED DONE ABORT ABORTDONE )
Enumerate all possible migration phases.
func ParsePhase ¶
ParsePhase converts a string model migration phase name to its constant value.
func (Phase) CanTransitionTo ¶
CanTransitionTo returns true if the given phase is a valid next model migration phase.
func (Phase) IsTerminal ¶
IsTerminal returns true if the phase is one which signifies the end of a migration.
type TargetInfo ¶
type TargetInfo struct { // ControllerTag holds tag for the target controller. ControllerTag names.ModelTag // Addrs holds the addresses and ports of the target controller's // API servers. Addrs []string // CACert holds the CA certificate that will be used to validate // the target API server's certificate, in PEM format. CACert string // AuthTag holds the user tag to authenticate with to the target // controller. AuthTag names.UserTag // Password holds the password to use with AuthTag. Password string }
TargetInfo holds the details required to connect to a migration's target controller.
TODO(mjs) - Note the similarity to api.Info. It would be nice to be able to use api.Info here but state can't import api and moving api.Info to live under the core package is too big a project to be done right now.
func (*TargetInfo) Validate ¶
func (info *TargetInfo) Validate() error
Validate returns an error if the TargetInfo contains bad data. Nil is returned otherwise.