health

package
v0.32.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Counts

	GVR string
}

Check tracks resource health.

func NewCheck

func NewCheck(gvr string) *Check

NewCheck returns a new health check.

func (Check) DeepCopyObject

func (c Check) DeepCopyObject() runtime.Object

DeepCopyObject returns a container copy.

func (Check) GetObjectKind

func (Check) GetObjectKind() schema.ObjectKind

GetObjectKind returns a schema object.

func (*Check) Inc

func (c *Check) Inc(l Level)

Inc increments a health metric.

func (*Check) Set

func (c *Check) Set(l Level, v int64)

Set sets a health metric.

func (*Check) Tally

func (c *Check) Tally(l Level) int64

Tally retrieves a given health metric.

func (*Check) Total

func (c *Check) Total(n int64)

Total stores a metric total.

type Checks

type Checks []*Check

Checks represents a collection of health checks.

type Counts

type Counts map[Level]int64

Counts tracks health counts by category.

type Level

type Level int

Level tracks health count categories.

const (
	// Unknown represents no health level.
	Unknown Level = 1 << iota

	// Corpus tracks total health.
	Corpus

	// S1 tracks series 1.
	S1

	// S2 tracks series 2.
	S2

	// S3 tracks series 3.
	S3
)

type Message

type Message struct {
	Level   Level
	Message string
	GVR     string
	FQN     string
}

Message represents a health message.

type Messages

type Messages []Message

Messages tracks a collection of messages.

type Vital

type Vital struct {
	Resource         string
	Total, OK, Toast int
}

Vital tracks a resource vitals.

type Vitals

type Vitals []Vital

Vitals tracks a collection of resource health.

Jump to

Keyboard shortcuts

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