diagnosticstoreobserve

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MaxStaleness = 3 * time.Minute

Variables

This section is empty.

Functions

func Healthy

func Healthy(snapshot Snapshot, now time.Time) bool

func Render

func Render(snapshot Snapshot, now time.Time) string

Types

type Collector

type Collector func(context.Context) (diagnosticstore.Result, error)

type Handler

type Handler struct {
	State *State
	Now   func() time.Time
}

func (Handler) ServeHTTP

func (h Handler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type Snapshot

type Snapshot struct {
	CapturedAt                time.Time
	Result                    diagnosticstore.Result
	Error                     string
	GrowthBytesPerSecond      float64
	ForecastExhaustionSeconds float64
}

type State

type State struct {
	// contains filtered or unexported fields
}

func (*State) Sample

func (s *State) Sample(ctx context.Context, collect Collector, now time.Time)

func (*State) Snapshot

func (s *State) Snapshot() Snapshot

Jump to

Keyboard shortcuts

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