node

package
v0.1.55 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: GPL-3.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 Control added in v0.1.35

type Control struct {
	Upgrading  bool
	Draining   bool
	Recovering bool
}

type Health added in v0.1.35

type Health struct {
	Cluster        bool
	Etcd           bool
	Running        bool
	MemoryPressure bool
	CPUPressure    bool
}

type Node

type Node struct {
	NodeID     uint64
	NodeName   string
	API        string
	URL        string
	ConfChange raftpb.ConfChange `yaml:"-" json:"-"`
	State      State
	Version    *version.Version
}

func NewNode

func NewNode() *Node

func NewNodeDefinition added in v0.1.30

func NewNodeDefinition(cluster []*Node, nodeId uint64) *Node

func (*Node) Accepting added in v0.1.42

func (node *Node) Accepting() bool

func (*Node) Parse added in v0.1.42

func (node *Node) Parse(change raftpb.ConfChange) error

func (*Node) SetDrain added in v0.1.42

func (node *Node) SetDrain(drain bool)

func (*Node) SetUpgrade added in v0.1.42

func (node *Node) SetUpgrade(upgrade bool)

func (*Node) ToJSON added in v0.1.42

func (node *Node) ToJSON() ([]byte, error)

type Nodes

type Nodes struct {
	Nodes []*Node
}

func NewNodes

func NewNodes() *Nodes

func (*Nodes) Add

func (nodes *Nodes) Add(node *Node)

func (*Nodes) AddOrUpdate added in v0.1.42

func (nodes *Nodes) AddOrUpdate(node *Node)

func (*Nodes) Find added in v0.0.128

func (nodes *Nodes) Find(node *Node) *Node

func (*Nodes) FindById added in v0.1.42

func (nodes *Nodes) FindById(id uint64) *Node

func (*Nodes) GenerateID added in v0.1.42

func (nodes *Nodes) GenerateID() uint64

func (*Nodes) NewNode

func (nodes *Nodes) NewNode(nodeName string, url string, API string) *Node

func (*Nodes) Remove

func (nodes *Nodes) Remove(node *Node)

func (*Nodes) ToString

func (nodes *Nodes) ToString() []string

type State added in v0.1.35

type State struct {
	Health  Health
	Control Control
}

func NewState added in v0.1.42

func NewState() State

Jump to

Keyboard shortcuts

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