hostmetrics

package
v0.6.20 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package hostmetrics samples the agent process's runtime health for the Heartbeat frame: CPU share, memory, goroutines, GC pauses, and the framework database pool. Standard library only; fields a platform cannot report ship as zero and the UI renders them as absent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sampler

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

Sampler produces HostMetrics samples. Safe for use from the heartbeat goroutine; CPU deltas are tracked between consecutive Collect calls.

func New

func New(db *sql.DB) *Sampler

New returns a Sampler. db may be nil.

func (*Sampler) Collect

func (s *Sampler) Collect() *adminv1.HostMetrics

Collect returns a point-in-time sample.

Jump to

Keyboard shortcuts

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