health

package
v1.17.0-pre.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const TableName = "health"

Variables

View Source
var (
	PrimaryIndex = statedb.Index[types.Status, types.HealthID]{
		Name: "identifier",
		FromObject: func(s types.Status) index.KeySet {
			return index.NewKeySet([]byte(s.ID.String()))
		},
		FromKey: func(k types.HealthID) index.Key {
			return index.Key([]byte(k))
		},
		Unique: true,
	}
	LevelIndex = statedb.Index[types.Status, types.Level]{
		Name: "level",
		FromObject: func(s types.Status) index.KeySet {
			return index.NewKeySet([]byte(s.Level))
		},
		FromKey: func(key types.Level) index.Key {
			return index.Key([]byte(key))
		},
		Unique: false,
	}
)
View Source
var Cell = cell.Module(
	"health",
	"Modular Health Provider V2",
	cell.ProvidePrivate(newTablesPrivate),
	cell.Provide(
		newHealthV2Provider,
		statedb.RWTable[types.Status].ToTable,
	),

	cell.Invoke(metricPublisher),
	metrics.Metric(newMetrics),
)

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	HealthStatusGauge         metric.Vec[metric.Gauge]
	DegradedHealthStatusGauge metric.DeletableVec[metric.Gauge]
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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