types

package
v1.16.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelOK       = "OK"
	LevelDegraded = "Degraded"
	LevelStopped  = "Stopped"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthID

type HealthID string

HealthID is used as the key for the primary index for health status tables.

type Identifier

type Identifier struct {
	Module    cell.FullModuleID
	Component pathIdent
}

Identifier is a fully qualified, path based identifier for health status which is made up of module ID and component ID parts.

func (Identifier) HealthID

func (i Identifier) HealthID() HealthID

func (Identifier) String

func (i Identifier) String() string

func (Identifier) WithSubComponent

func (i Identifier) WithSubComponent(name string) Identifier

WithSubComponent returns view of an identifier with an appended subcomponent.

type Level

type Level string

type Provider

type Provider interface {
	ForModule(mid cell.FullModuleID) cell.Health
}

Provider has functionality to create health reporters, scoped a module.

type Status

type Status struct {
	ID      Identifier
	Level   Level
	Message string
	Error   string
	LastOK  time.Time
	Updated time.Time
	Stopped time.Time
	// Final is the final message set when a status is stopped.
	Final string
	Count uint64
}

Status represents a current health status update.

func (Status) String

func (s Status) String() string

func (Status) TableHeader

func (Status) TableHeader() []string

func (Status) TableRow

func (s Status) TableRow() []string

Jump to

Keyboard shortcuts

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