package configmetrics
import "k8s.io/apiserver/pkg/util/configmetrics"
Index ¶
- func NewConfigInfoCustomCollector(desc *metrics.Desc, hashProvider HashProvider) metrics.StableCollector
- type AtomicHashProvider
- func NewAtomicHashProvider() *AtomicHashProvider
- func (h *AtomicHashProvider) GetCurrentHashes() []string
- func (h *AtomicHashProvider) SetHashes(hashes ...string)
- type HashProvider
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
Source Files ¶
info_collector.go
- Version
- v0.35.0-alpha.0
- Published
- Aug 6, 2025
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 1 hour ago –
Tools for package owners.