state

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

State keeps track of the current stats

func NewState

func NewState() (*State, error)

NewState instantiate a state with the associated prometheus metrics

func (*State) GetKubeletLogsPodRunning

func (s *State) GetKubeletLogsPodRunning() int

GetKubeletLogsPodRunning returns the number of kubelet Pods in /var/log/pods

func (*State) GetKubeletProbeFail

func (s *State) GetKubeletProbeFail() int

GetKubeletProbeFail returns the number of kubelet failures

func (*State) IncKubeletProbeFailures

func (s *State) IncKubeletProbeFailures()

IncKubeletProbeFailures increment the number of kubelet failures

func (*State) IsKubectlApplied added in v0.6.0

func (s *State) IsKubectlApplied() bool

IsKubectlApplied returns true when kubectl is already applied

func (*State) IsReady

func (s *State) IsReady() bool

IsReady returns if the kube-apiserver is available and the manifests are applied

func (*State) SetAPIServerProbeLastError

func (s *State) SetAPIServerProbeLastError(msg string)

SetAPIServerProbeLastError keep track of the latest error message and display only if there is a a diff from the last record

func (*State) SetDNSLastError added in v0.6.0

func (s *State) SetDNSLastError(msg string)

SetDNSLastError keep track of the latest error message and display only if there is a a diff from the last record

func (*State) SetKubectlApplied added in v0.6.0

func (s *State) SetKubectlApplied()

SetKubectlApplied mark the state when kubectl apply successfully returned

func (*State) SetKubeletAPIPodRunning

func (s *State) SetKubeletAPIPodRunning(nb int)

SetKubeletAPIPodRunning keep track of the number of kubelet Pods and display only if there is a a diff from the last record

func (*State) SetKubeletLogsPodRunning

func (s *State) SetKubeletLogsPodRunning(nb int)

SetKubeletLogsPodRunning keep track of the number of kubelet Pods in /var/log/pods and display only if there is a a diff from the last record

func (*State) SetReady

func (s *State) SetReady()

SetReady is the trigger to mark pupernetes as ready. It notify systemd of its readiness

Jump to

Keyboard shortcuts

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