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 ¶
HashProvider is an interface for getting the current config hash values
Click to show internal directories.
Click to hide internal directories.