Help us shape the future of Go! Take the 2026 Go Developer Survey

admin

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package admin serves the endpoints Kubernetes and operators talk to: the probes, the Prometheus metrics and the status and pprof endpoints.

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 the operational endpoints. It carries no authentication: in a sidecar it is the only listener the Pod network can reach, and a Deployment restricts it with a NetworkPolicy.

func NewHandler

func NewHandler(opts Options) (*Handler, error)

NewHandler builds the operational handler.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler.

type Options

type Options struct {
	Status  StatusReporter
	Metrics *metrics.Metrics
	Logger  *slog.Logger

	// Revision is the commit the binary was built from.
	Revision string

	// PprofEnabled exposes /debug/pprof.
	PprofEnabled bool
}

Options configures NewHandler.

type StatusReporter

type StatusReporter interface {
	Status() bridge.Status
}

StatusReporter is the part of the bridge the operational listener reports on.

Jump to

Keyboard shortcuts

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