Documentation ¶
Index ¶
- type ExecutionContext
- func (ec *ExecutionContext) AddPaxosNode(node model.PaxosNodeStatus)
- func (ec *ExecutionContext) Completed() bool
- func (ec *ExecutionContext) ContainsPaxosNode(name string) bool
- func (ec *ExecutionContext) DeleteTopology(generation int64)
- func (ec *ExecutionContext) GetNodeTemplate(generation int64, nodeSet string, index int) *polardbxv1xstore.NodeTemplate
- func (ec *ExecutionContext) MarkStepIndex(index int)
- func (ec *ExecutionContext) NeedRebuildPlan() bool
- func (ec *ExecutionContext) RemovePaxosNode(name string)
- func (ec *ExecutionContext) SetExtraPodFactory(extraPodFactory factory.ExtraPodFactory)
- func (ec *ExecutionContext) SetPlan(plan plan.Plan)
- func (ec *ExecutionContext) SetTopology(generation int64, topology *polardbxv1xstore.Topology)
- func (ec *ExecutionContext) TopologyGenerations() []int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionContext ¶
type ExecutionContext struct { // Topologies in uses. Topologies map[int64]*xstore.Topology `json:"topologies,omitempty"` // Generation. Generation int64 `json:"generation,omitempty"` // Current running nodes. Running map[string]model.PaxosNodeStatus `json:"running,omitempty"` // Tracking nodes. This is the tracking set of the paxos node configuration. Tracking map[string]model.PaxosNodeStatus `json:"tracking,omitempty"` // Expected nodes. Expected map[string]model.PaxosNode `json:"expected,omitempty"` // Current usable volumes. Volumes map[string]model.PaxosVolume `json:"volumes,omitempty"` // Plan. Plan *plan.Plan `json:"plan,omitempty"` // StepIndex of the plan. StepIndex int `json:"step_index,omitempty"` PodFactory factory.ExtraPodFactory `json:"-"` }
ExecutionContext is a serializable struct which provides the runtime execution information for the executors. It tracks all the history topologies in use and the index of the next step. It's large and should be cached in use and updated lazily.
func (*ExecutionContext) AddPaxosNode ¶
func (ec *ExecutionContext) AddPaxosNode(node model.PaxosNodeStatus)
func (*ExecutionContext) Completed ¶
func (ec *ExecutionContext) Completed() bool
func (*ExecutionContext) ContainsPaxosNode ¶
func (ec *ExecutionContext) ContainsPaxosNode(name string) bool
func (*ExecutionContext) DeleteTopology ¶
func (ec *ExecutionContext) DeleteTopology(generation int64)
func (*ExecutionContext) GetNodeTemplate ¶
func (ec *ExecutionContext) GetNodeTemplate(generation int64, nodeSet string, index int) *polardbxv1xstore.NodeTemplate
func (*ExecutionContext) MarkStepIndex ¶
func (ec *ExecutionContext) MarkStepIndex(index int)
func (*ExecutionContext) NeedRebuildPlan ¶
func (ec *ExecutionContext) NeedRebuildPlan() bool
func (*ExecutionContext) RemovePaxosNode ¶
func (ec *ExecutionContext) RemovePaxosNode(name string)
func (*ExecutionContext) SetExtraPodFactory ¶
func (ec *ExecutionContext) SetExtraPodFactory(extraPodFactory factory.ExtraPodFactory)
func (*ExecutionContext) SetPlan ¶
func (ec *ExecutionContext) SetPlan(plan plan.Plan)
func (*ExecutionContext) SetTopology ¶
func (ec *ExecutionContext) SetTopology(generation int64, topology *polardbxv1xstore.Topology)
func (*ExecutionContext) TopologyGenerations ¶
func (ec *ExecutionContext) TopologyGenerations() []int64
Click to show internal directories.
Click to hide internal directories.