Documentation
¶
Index ¶
- type ReconcileError
- type Recorder
- func (r *Recorder) GetReconcileErrorMetric() *prometheus.CounterVec
- func (r *Recorder) InjectAddonServiceAPIRequestDuration(s prometheus.Summary)
- func (r *Recorder) InjectOCMAPIRequestDuration(s prometheus.Summary)
- func (r *Recorder) RecordAddonMetrics(addon *addonsv1alpha1.Addon)
- func (r *Recorder) RecordAddonServiceAPIRequests(us float64)
- func (r *Recorder) RecordOCMAPIRequests(us float64)
- func (r *Recorder) SetAddonOperatorPaused(paused bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReconcileError ¶ added in v1.14.0
type ReconcileError struct {
// contains filtered or unexported fields
}
Represents an error that happened in a reconciler's reconcile loop
func NewReconcileError ¶ added in v1.14.0
func NewReconcileError( controller string, recorder *Recorder, isSubReconcilerError bool, ) *ReconcileError
Creates a reconcile error object
func (*ReconcileError) Join ¶ added in v1.14.0
func (r *ReconcileError) Join(err1 error, err2 error) error
Wraps 2 errors and handles nil errors
func (*ReconcileError) Reason ¶ added in v1.14.0
func (r *ReconcileError) Reason() string
func (*ReconcileError) Report ¶ added in v1.14.0
func (r *ReconcileError) Report(err error, crName string)
Reports a reconcile error as a prometheus metric. The parameter crName is the name of the CR being reconciled by the controller.
func (*ReconcileError) SetRecorder ¶ added in v1.14.0
func (r *ReconcileError) SetRecorder(rec *Recorder)
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
Recorder stores all the metrics related to Addons.
func NewRecorder ¶
func (*Recorder) GetReconcileErrorMetric ¶ added in v1.14.0
func (r *Recorder) GetReconcileErrorMetric() *prometheus.CounterVec
func (*Recorder) InjectAddonServiceAPIRequestDuration ¶ added in v1.7.0
func (r *Recorder) InjectAddonServiceAPIRequestDuration(s prometheus.Summary)
func (*Recorder) InjectOCMAPIRequestDuration ¶
func (r *Recorder) InjectOCMAPIRequestDuration(s prometheus.Summary)
InjectOCMAPIRequestDuration allows us to override `r.ocmAPIRequestDuration` metric Useful while writing tests
func (*Recorder) RecordAddonMetrics ¶
func (r *Recorder) RecordAddonMetrics(addon *addonsv1alpha1.Addon)
RecordAddonMetrics is responsible for reconciling the following metrics: - addon_operator_addons_available - addon_operator_addons_paused - addon_operator_addons_total - addon_operator_addon_health_info
func (*Recorder) RecordAddonServiceAPIRequests ¶ added in v1.7.0
func (*Recorder) RecordOCMAPIRequests ¶
func (*Recorder) SetAddonOperatorPaused ¶
SetAddonOperatorPaused sets the `addon_operator_paused` metric 0 - Not paused , 1 - Paused