peers

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	HealthyBecauseCRNotFound                       reason = "CR Not found, node is considered healthy"
	HealthyBecauseErrorsThresholdNotReached        reason = "Errors number hasn't reached threshold not querying peers yet, node is considered healthy"
	HealthyBecauseNoPeersResponseNotReachedTimeout reason = "No response from peer. The duration of peer not responding hasn't passed the threshold so still considered healthy"
	HealthyBecauseNoPeersWereFound                 reason = "No Peers where found, node is considered healthy"
	HealthyBecauseMostPeersCantAccessAPIServer     reason = "Most peers couldn't access API server, node is considered healthy"

	UnHealthyBecausePeersResponse  reason = "Node is reported unhealthy by it's peers"
	UnHealthyBecauseNodeIsIsolated reason = "Node is isolated, node is considered unhealthy"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Peers

type Peers struct {
	client.Reader
	// contains filtered or unexported fields
}

func New

func New(myNodeName string, peerUpdateInterval time.Duration, reader client.Reader, log logr.Logger, apiServerTimeout time.Duration) *Peers

func (*Peers) GetPeersAddresses

func (p *Peers) GetPeersAddresses(role Role) [][]v1.NodeAddress

func (*Peers) Start

func (p *Peers) Start(ctx context.Context) error

type Response

type Response struct {
	IsHealthy bool
	Reason    reason
}

type Role

type Role int8
const (
	Worker Role = iota
	ControlPlane
)

Jump to

Keyboard shortcuts

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