node

package
v0.1.41 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: GPL-3.0 Imports: 3 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 {
	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
	State    State `json:"-"`
}

func NewNode

func NewNode() *Node

func NewNodeDefinition added in v0.1.30

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

func (*Node) ToJson added in v0.0.128

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) Find added in v0.0.128

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

func (*Nodes) NewNode

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

func (*Nodes) NewNodeRequest

func (nodes *Nodes) NewNodeRequest(body io.ReadCloser, id uint64) (*Node, error)

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
}

Jump to

Keyboard shortcuts

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