metricsconfig

package
v0.42.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ShutdownTimeoutDefault is a default value for metrics HTTP service timeout.
	ShutdownTimeoutDefault = 30 * time.Second

	// AddressDefault is a default value for metrics HTTP service endpoint.
	AddressDefault = "localhost:9090"
)

Variables

This section is empty.

Functions

func Address

func Address(c *config.Config) string

Address returns the value of "address" config parameter from "prometheus" section.

Returns AddressDefault if the value is not set.

func Enabled

func Enabled(c *config.Config) bool

Enabled returns the value of "enabled" config parameter from "prometheus" section.

Returns false if the value is missing or invalid.

func ShutdownTimeout

func ShutdownTimeout(c *config.Config) time.Duration

ShutdownTimeout returns the value of "shutdown_timeout" config parameter from "prometheus" section.

Returns ShutdownTimeoutDefault if the value is not positive duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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