shared

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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PeerUpdateInterval = 30 * time.Second
	ApiCheckInterval   = 1 * time.Second
	MaxErrorThreshold  = 1
	Namespace          = "self-node-remediation"
	UnhealthyNodeName  = "node1"
	PeerNodeName       = "node2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sClientWrapper

type K8sClientWrapper struct {
	client.Client
	Reader                         client.Reader
	ShouldSimulateFailure          bool
	ShouldSimulatePodDeleteFailure bool
	SimulatedFailureMessage        string
}

func (*K8sClientWrapper) List

func (kcw *K8sClientWrapper) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

type MockCalculator

type MockCalculator struct {
	MockTimeToAssumeNodeRebooted time.Duration
	IsAgentVar                   bool
}

func (*MockCalculator) GetTimeToAssumeNodeRebooted

func (m *MockCalculator) GetTimeToAssumeNodeRebooted() time.Duration

func (*MockCalculator) IsAgent

func (m *MockCalculator) IsAgent() bool

func (*MockCalculator) SetTimeToAssumeNodeRebooted

func (m *MockCalculator) SetTimeToAssumeNodeRebooted(timeToAssumeNodeRebooted time.Duration)

func (*MockCalculator) Start

func (m *MockCalculator) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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