Documentation ¶
Index ¶
- type Metrics
- func (c Metrics) CollectWithStability(ch chan<- metrics.Metric)
- func (c Metrics) DescribeWithStability(ch chan<- *metrics.Desc)
- func (c Metrics) ForgetAPIService(apiServiceKey string)
- func (m *Metrics) Register(registrationFunc func(metrics.Registerable) error, ...) error
- func (c Metrics) SetAPIServiceAvailable(apiServiceKey string)
- func (c Metrics) SetAPIServiceUnavailable(apiServiceKey string)
- func (m *Metrics) SetUnavailableCounter(originalAPIService, newAPIService *apiregistrationv1.APIService)
- func (m *Metrics) SetUnavailableGauge(newAPIService *apiregistrationv1.APIService)
- func (m *Metrics) UnavailableCounter(apiServiceName, reason string) metrics.CounterMetric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func (Metrics) CollectWithStability ¶
CollectWithStability implements the metrics.StableCollector interface.
func (Metrics) DescribeWithStability ¶
DescribeWithStability implements the metrics.StableCollector interface.
func (Metrics) ForgetAPIService ¶
func (c Metrics) ForgetAPIService(apiServiceKey string)
ForgetAPIService removes the availability gauge of the given apiservice.
func (*Metrics) Register ¶
func (m *Metrics) Register( registrationFunc func(metrics.Registerable) error, customRegistrationFunc func(metrics.StableCollector) error, ) error
Register registers apiservice availability metrics.
func (Metrics) SetAPIServiceAvailable ¶
func (c Metrics) SetAPIServiceAvailable(apiServiceKey string)
SetAPIServiceAvailable sets the given apiservice availability gauge to available.
func (Metrics) SetAPIServiceUnavailable ¶
func (c Metrics) SetAPIServiceUnavailable(apiServiceKey string)
SetAPIServiceUnavailable sets the given apiservice availability gauge to unavailable.
func (*Metrics) SetUnavailableCounter ¶
func (m *Metrics) SetUnavailableCounter(originalAPIService, newAPIService *apiregistrationv1.APIService)
SetUnavailableCounter increases the metrics only if the given service is unavailable and its APIServiceCondition has changed
func (*Metrics) SetUnavailableGauge ¶
func (m *Metrics) SetUnavailableGauge(newAPIService *apiregistrationv1.APIService)
SetUnavailableGauge set the metrics so that it reflect the current state base on availability of the given service
func (*Metrics) UnavailableCounter ¶
func (m *Metrics) UnavailableCounter(apiServiceName, reason string) metrics.CounterMetric
UnavailableCounter returns a counter to track apiservices marked as unavailable.