unremovable

package
v0.0.0-...-7df4f84 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nodes

type Nodes struct {
	// contains filtered or unexported fields
}

Nodes tracks the state of cluster nodes that cannot be removed.

func NewNodes

func NewNodes() *Nodes

NewNodes returns a new initialized Nodes object.

func (*Nodes) Add

func (n *Nodes) Add(node *simulator.UnremovableNode)

Add adds an unremovable node.

func (*Nodes) AddReason

func (n *Nodes) AddReason(node *apiv1.Node, reason simulator.UnremovableReason)

AddReason adds an unremovable node due to the specified reason.

func (*Nodes) AddTimeout

func (n *Nodes) AddTimeout(node *simulator.UnremovableNode, timeout time.Time)

AddTimeout adds a new unremovable node with a timeout until which the node should be considered unremovable.

func (*Nodes) AsList

func (n *Nodes) AsList() []*simulator.UnremovableNode

AsList returns a list of unremovable nodes.

func (*Nodes) Contains

func (n *Nodes) Contains(nodeName string) bool

Contains returns true iff a given node is unremovable.

func (*Nodes) HasReason

func (n *Nodes) HasReason(nodeName string) bool

HasReason returns true iff a given node has a reason to be unremovable.

func (*Nodes) IsRecent

func (n *Nodes) IsRecent(nodeName string) bool

IsRecent returns true iff a given node was recently added

func (*Nodes) Update

func (n *Nodes) Update(nodeInfos nodeInfoGetter, timestamp time.Time)

Update updates the internal structure according to current state of the cluster. Removes the nodes that are no longer in the nodes list.

Jump to

Keyboard shortcuts

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