monitor

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package monitor serves authenticated, process-local monitoring snapshots.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(cfg Config, node Node, next http.Handler) http.Handler

Handler serves the embedded monitoring console and token-protected node API.

Types

type Config

type Config struct {
	Token string `yaml:"token" json:"-"`
}

Config grants read-only access to this node; an empty token disables node data.

func (*Config) Validate

func (c *Config) Validate() error

Validate expands environment variables and requires a distinct monitor token.

type Node added in v0.18.3

type Node struct {
	Role, PublicKey string
	Version, Commit string
}

Node identifies the process a snapshot describes. Empty build fields report "dev", matching the Peer server info of unversioned builds.

Directories

Path Synopsis
Package monitorapi provides primitives to interact with the openapi HTTP API.
Package monitorapi provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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