metrics

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package metrics implements the tailkitd metrics integration, exposing host, CPU, memory, disk, network, and process metrics via gopsutil.

No persistent connection is needed — gopsutil reads /proc directly on Linux. Missing metrics.toml → 503 on every endpoint (invariant 5).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler serves all /integrations/metrics/* endpoints.

func NewHandler

func NewHandler(cfg config.MetricsConfig, logger *zap.Logger) *Handler

NewHandler constructs a metrics Handler.

func (*Handler) Register

func (h *Handler) Register(mux *http.ServeMux)

Register mounts all metrics endpoints onto mux.

GET /integrations/metrics/available
GET /integrations/metrics/config
GET /integrations/metrics/host
GET /integrations/metrics/cpu
GET /integrations/metrics/memory
GET /integrations/metrics/disk
GET /integrations/metrics/network
GET /integrations/metrics/processes
GET /integrations/metrics/all

Jump to

Keyboard shortcuts

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