Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // Record records all the metrics summarised from an engine Sync. Record([]common.ResourceSyncResult) // CountError tracks errors. CountError() }
Interface implementations provide metrics for the system.
type MockMetrics ¶
type MockMetrics struct { Synced int64 SyncFailed int64 Pruned int64 PruneSkipped int64 Errors int64 // contains filtered or unexported fields }
MockMetrics is a type that provides a simple counter for metrics for test purposes.
func (*MockMetrics) CountError ¶
func (p *MockMetrics) CountError()
func (*MockMetrics) Record ¶
func (p *MockMetrics) Record(r []common.ResourceSyncResult)
CountFailedAPICall records failed outgoing API calls to upstream services.
type PrometheusMetrics ¶
type PrometheusMetrics struct {
// contains filtered or unexported fields
}
PrometheusMetrics is a wrapper around Prometheus metrics for counting events in the system.
func New ¶
func New(ns string, reg prometheus.Registerer) *PrometheusMetrics
New creates and returns a PrometheusMetrics initialised with prometheus gauges.
func (*PrometheusMetrics) CountError ¶
func (m *PrometheusMetrics) CountError()
CountError counts the number of errors during synchronisation.
func (*PrometheusMetrics) Record ¶
func (p *PrometheusMetrics) Record(r []common.ResourceSyncResult)
Record is an implementation of the metrics Interface.
Click to show internal directories.
Click to hide internal directories.