health

package
v1.17.0-pre.3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 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:    index.Stringer[types.HealthID],
		FromString: index.FromString,
		Unique:     true,
	}
	LevelIndex = statedb.Index[types.Status, types.Level]{
		Name: "level",
		FromObject: func(s types.Status) index.KeySet {
			return index.NewKeySet(index.Stringer(s.Level))
		},
		FromKey:    index.Stringer[types.Level],
		FromString: index.FromString,
		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