configmetrics

package
v0.35.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigInfoCustomCollector

func NewConfigInfoCustomCollector(desc *metrics.Desc, hashProvider HashProvider) metrics.StableCollector

NewConfigInfoCustomCollector creates a custom collector for config hash info metrics. This eliminates the need for state management and locks by collecting metrics on demand.

Types

type AtomicHashProvider

type AtomicHashProvider struct {
	// contains filtered or unexported fields
}

AtomicHashProvider implements HashProvider using a single atomic pointer to a slice

func NewAtomicHashProvider

func NewAtomicHashProvider() *AtomicHashProvider

NewAtomicHashProvider creates a new atomic hash provider

func (*AtomicHashProvider) GetCurrentHashes

func (h *AtomicHashProvider) GetCurrentHashes() []string

func (*AtomicHashProvider) SetHashes

func (h *AtomicHashProvider) SetHashes(hashes ...string)

type HashProvider

type HashProvider interface {
	GetCurrentHashes() []string
	SetHashes(hashes ...string)
}

HashProvider is an interface for getting the current config hash values

Jump to

Keyboard shortcuts

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