v1

package
v1.11.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Package v1 defines the pushgateway API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	MetricStore storage.MetricStore
	Flags       map[string]string
	StartTime   time.Time
	BuildInfo   map[string]string
	// contains filtered or unexported fields
}

API provides registration of handlers for API routes.

func New

func New(
	l *slog.Logger,
	ms storage.MetricStore,
	flags map[string]string,
	buildInfo map[string]string,
) *API

New returns a new API. The log.Logger can be nil, in which case no logging is performed.

func (*API) Register

func (api *API) Register(r *route.Router)

Register registers the API handlers under their correct routes in the given router.

Jump to

Keyboard shortcuts

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