context

package
v1.2.3 Latest Latest
Warning

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

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

Documentation

Index

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

Jump to

Keyboard shortcuts

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