http

package
v0.19.0-m0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EndpointType

type EndpointType int
const (
	Metrics EndpointType = 1 << iota
	Profile
)

type StopFunc

type StopFunc func()

func StartServer

func StartServer(endpoints EndpointType, port int) StopFunc

StartServer starts an HTTP server providing access to Prometheus metrics and/or profiling information. endpoints specifies the endpoints to provide; it can be Metrics, Profile, or both (ored). port specifies the TCP port on which the server listens. The returned function should be called to shut down the server, typically at process exit using defer in the main() function.

Jump to

Keyboard shortcuts

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