Documentation ¶
Index ¶
- Variables
- func RegisterMetrics()
- type LabelPropagationMetrics
- type LabelPropagationStats
- type SyncerMetrics
- func (sm *SyncerMetrics) DeleteSyncer(key negtypes.NegSyncerKey)
- func (sm *SyncerMetrics) Run(stopCh <-chan struct{})
- func (sm *SyncerMetrics) SetLabelPropagationStats(key negtypes.NegSyncerKey, ...)
- func (sm *SyncerMetrics) SetSyncerEPMetrics(key negtypes.NegSyncerKey, endpointStat *negtypes.SyncerEPStat)
- func (sm *SyncerMetrics) UpdateSyncer(key negtypes.NegSyncerKey, syncResult *negtypes.NegSyncResult)
- func (sm *SyncerMetrics) UpdateSyncerNegCount(key negtypes.NegSyncerKey, negsByLocation map[string]int)
- type SyncerMetricsCollector
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NumberOfEndpoints = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Subsystem: negControllerSubsystem, Name: "number_of_endpoints", Help: "The total number of endpoints", }, []string{"feature"}, ) )
Functions ¶
func RegisterMetrics ¶
func RegisterMetrics()
Types ¶
type LabelPropagationMetrics ¶
LabelPropagationMetrics contains aggregated label propagation related metrics.
type LabelPropagationStats ¶
LabelPropagationStat contains stats related to label propagation.
type SyncerMetrics ¶
type SyncerMetrics struct {
// contains filtered or unexported fields
}
func FakeSyncerMetrics ¶
func FakeSyncerMetrics() *SyncerMetrics
FakeSyncerMetrics creates new NegMetricsCollector with fixed 5 second metricsInterval, to be used in tests
func NewNegMetricsCollector ¶
func NewNegMetricsCollector(exportInterval time.Duration, logger klog.Logger) *SyncerMetrics
NewNEGMetricsCollector initializes SyncerMetrics and starts a go routine to compute and export metrics periodically.
func (*SyncerMetrics) DeleteSyncer ¶
func (sm *SyncerMetrics) DeleteSyncer(key negtypes.NegSyncerKey)
DeleteSyncer will reset any metrics for the syncer corresponding to `key`. It should be invoked when a Syncer has been stopped.
func (*SyncerMetrics) Run ¶
func (sm *SyncerMetrics) Run(stopCh <-chan struct{})
func (*SyncerMetrics) SetLabelPropagationStats ¶
func (sm *SyncerMetrics) SetLabelPropagationStats(key negtypes.NegSyncerKey, labelstatLabelPropagationStats LabelPropagationStats)
func (*SyncerMetrics) SetSyncerEPMetrics ¶
func (sm *SyncerMetrics) SetSyncerEPMetrics(key negtypes.NegSyncerKey, endpointStat *negtypes.SyncerEPStat)
SetSyncerEPMetrics update the endpoint count based on the endpointStat
func (*SyncerMetrics) UpdateSyncer ¶
func (sm *SyncerMetrics) UpdateSyncer(key negtypes.NegSyncerKey, syncResult *negtypes.NegSyncResult)
UpdateSyncer update the status of corresponding syncer based on the syncResult.
func (*SyncerMetrics) UpdateSyncerNegCount ¶
func (sm *SyncerMetrics) UpdateSyncerNegCount(key negtypes.NegSyncerKey, negsByLocation map[string]int)
type SyncerMetricsCollector ¶
type SyncerMetricsCollector interface { UpdateSyncer(key negtypes.NegSyncerKey, result *negtypes.NegSyncResult) SetSyncerEPMetrics(key negtypes.NegSyncerKey, epState *negtypes.SyncerEPStat) SetLabelPropagationStats(key negtypes.NegSyncerKey, labelstatLabelPropagationStats LabelPropagationStats) // Updates the number of negs per syncer per zone UpdateSyncerNegCount(key negtypes.NegSyncerKey, negByLocation map[string]int) }
Click to show internal directories.
Click to hide internal directories.