Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Plan ¶
type Plan struct {
// Nodes observed when the plan is built.
Nodes []model.PaxosNode `json:"nodes,omitempty"`
// Steps of the plan.
Steps []Step `json:"steps,omitempty"`
}
Plan is a sequence of steps that are going to be executed one by one.
func (*Plan) AppendStep ¶
type Step ¶
type Step struct {
// Type of the step.
Type StepType `json:"type,omitempty"`
// Original generation of the target.
// Valid for StepTypeBumpGen, StepTypeUpdate, StepTypeReplace and StepTypeDelete.
OriginGeneration int64 `json:"origin_generation,omitempty"`
// Original host of the target.
// Valid for StepTypeBumpGen, StepTypeUpdate, StepTypeReplace and StepTypeDelete.
OriginHost string `json:"origin_host,omitempty"`
// Target generation of the target. Valid for all StepTypeBumpGen, StepTypeUpdate, StepTypeReplace and StepTypeCreate.
TargetGeneration int64 `json:"target_generation,omitempty"`
// Target host of the target. If it is empty, it means the host is not specified.
// Valid for all StepTypeBumpGen, StepTypeUpdate, StepTypeReplace and StepTypeCreate.
TargetHost string `json:"target_host,omitempty"`
// Target pod of the step.
Target string `json:"target,omitempty"`
// Target role.
TargetRole string `json:"role,omitempty"`
// Node set.
NodeSet string `json:"node_set,omitempty"`
// Index in node set.
Index int `json:"index,omitempty"`
// Volumes that is going to use in the step.
Volumes []string `json:"volumes,omitempty"`
}
Step is the basic unit of a plan.
func (*Step) Description ¶
type StepType ¶
type StepType string
const ( StepTypeSnapshot StepType = "Snapshot" StepTypeBumpGen StepType = "BumpGen" StepTypeUpdate StepType = "Update" StepTypeReplace StepType = "Replace" StepTypeCreate StepType = "Create" StepTypeDelete StepType = "Delete" )
Valid plan node types. The order of the raw values is the order of the node types.
Click to show internal directories.
Click to hide internal directories.