Documentation ¶
Index ¶
- func BoolToString(b bool) string
- func NewMetricsHandlerIntegration(_ log.Logger, c integrations.Config, mc common.MetricsConfig, ...) (integrations.MetricsIntegration, error)
- func NewNamedShim(newName string) v2.UpgradeFunc
- func Shim(before v1.Config, common common.MetricsConfig) (after v2.UpgradedConfig)
- type ConfigShim
- func (s *ConfigShim) ApplyDefaults(g v2.Globals) error
- func (s *ConfigShim) ConfigEquals(c v2.Config) bool
- func (s *ConfigShim) Identifier(g v2.Globals) (string, error)
- func (s *ConfigShim) LegacyConfig() (v1.Config, common.MetricsConfig)
- func (s *ConfigShim) Name() string
- func (s *ConfigShim) NewIntegration(l log.Logger, g v2.Globals) (v2.Integration, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolToString ¶ added in v0.25.0
BoolToString is a helper for converting boolean values to a Prometheus labels-compatible string.
func NewMetricsHandlerIntegration ¶
func NewMetricsHandlerIntegration( _ log.Logger, c integrations.Config, mc common.MetricsConfig, globals integrations.Globals, h http.Handler, ) (integrations.MetricsIntegration, error)
NewMetricsHandlerIntegration returns a integrations.MetricsIntegration which will expose a /metrics endpoint for h.
func NewNamedShim ¶ added in v0.22.9
func NewNamedShim(newName string) v2.UpgradeFunc
NewNamedShim returns a v2.UpgradeFunc which will upgrade a v1.Config to a v2.Config with a new name.
func Shim ¶ added in v0.22.9
func Shim(before v1.Config, common common.MetricsConfig) (after v2.UpgradedConfig)
Shim upgrades a v1.Config to a v2.Config. The resulting config is NOT registered. Shim matches the v2.UpgradeFunc type.
Types ¶
type ConfigShim ¶ added in v0.38.0
type ConfigShim struct { Orig v1.Config Common common.MetricsConfig // contains filtered or unexported fields }
func (*ConfigShim) ApplyDefaults ¶ added in v0.38.0
func (s *ConfigShim) ApplyDefaults(g v2.Globals) error
func (*ConfigShim) ConfigEquals ¶ added in v0.38.0
func (s *ConfigShim) ConfigEquals(c v2.Config) bool
func (*ConfigShim) Identifier ¶ added in v0.38.0
func (s *ConfigShim) Identifier(g v2.Globals) (string, error)
func (*ConfigShim) LegacyConfig ¶ added in v0.38.0
func (s *ConfigShim) LegacyConfig() (v1.Config, common.MetricsConfig)
func (*ConfigShim) Name ¶ added in v0.38.0
func (s *ConfigShim) Name() string
func (*ConfigShim) NewIntegration ¶ added in v0.38.0
func (s *ConfigShim) NewIntegration(l log.Logger, g v2.Globals) (v2.Integration, error)
Click to show internal directories.
Click to hide internal directories.