service

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DefaultPath is the default HTTP path for the metrics endpoint.
	DefaultPath = "/metrics"
)

Variables

This section is empty.

Functions

func NewService

func NewService(network, addr string, opts ...Option) (service.Service, error)

NewService creates a metrics Service that exposes Prometheus metrics over HTTP. It serves from the TNET custom registry rather than the default one so that process metrics are available on all platforms.

Types

type Option

type Option func(*options)

Option configures the metrics service.

func AutherOption

func AutherOption(auther auth.Authenticator) Option

AutherOption sets the authenticator for the metrics endpoint.

func PathOption

func PathOption(path string) Option

PathOption sets the HTTP path for the metrics endpoint.

Jump to

Keyboard shortcuts

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