health

package
v0.0.0-...-a602bb6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 3 Imported by: 13 modules, 30 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 GenericVarz

type GenericVarz struct {
	// These fields are from individual components
	Type        string   `json:"type"`
	Index       uint     `json:"index"`
	Host        string   `json:"host"`
	Credentials []string `json:"credentials"`

	// These fields are automatically generated
	UUID      string      `json:"uuid"`
	StartTime schema.Time `json:"start"`

	// Static common metrics
	NumCores int `json:"num_cores"`

	// Dynamic common metrics
	MemStat int64   `json:"mem"`
	Cpu     float64 `json:"cpu"`

	Uptime    schema.Duration    `json:"uptime"`
	LogCounts *schema.LogCounter `json:"log_counts"`
}

type Health

type Health struct {
	OnDegrade onDegradeCallback
	// contains filtered or unexported fields
}

func (*Health) Health

func (h *Health) Health() Status

func (*Health) SetHealth

func (h *Health) SetHealth(s Status)

func (*Health) String

func (h *Health) String() string

type Status

type Status uint64
const (
	Initializing Status = iota
	Healthy
	Degraded
)

type Varz

type Varz struct {
	sync.Mutex
	GenericVarz
	UniqueVarz interface{} // Every component's unique metrics
}

func (*Varz) MarshalJSON

func (v *Varz) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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