Documentation ¶
Index ¶
- Constants
- type Metrics
- func (m *Metrics) DeleteCondition(obj conditionedObject, conditionType api.ConditionType)
- func (m *Metrics) DeleteReadiness(obj conditionedObject)
- func (m *Metrics) DeleteTrigger(requestObjKey client.ObjectKey, controllerName string)
- func (m *Metrics) RecordCondition(obj conditionedObject, conditionType api.ConditionType)
- func (m *Metrics) RecordReadiness(obj conditionedObject)
- func (m *Metrics) RecordStateDuration(gvk schema.GroupVersionKind, state string, duration time.Duration)
- func (m *Metrics) RecordSuspend(obj client.Object, suspend bool)
- func (m *Metrics) RecordTrigger(triggerGVK schema.GroupVersionKind, requestObjKey client.ObjectKey, ...)
- func (m *Metrics) Reset()
- type Sink
- func (r *Sink) Collectors() []prometheus.Collector
- func (r *Sink) DeleteCondition(ref client.ObjectKey, gvk schema.GroupVersionKind, condition api.Condition) int
- func (r *Sink) DeleteTrigger(requestObjKey client.ObjectKey, controllerName string) int
- func (r *Sink) RecordCondition(ref client.ObjectKey, gvk schema.GroupVersionKind, condition api.Condition, ...)
- func (r *Sink) RecordStateDuration(gvk schema.GroupVersionKind, state string, duration time.Duration)
- func (r *Sink) RecordSuspend(ref client.ObjectKey, gvk schema.GroupVersionKind, suspended bool)
- func (r *Sink) RecordTrigger(triggerGVK schema.GroupVersionKind, requestObjKey client.ObjectKey, ...)
- func (r *Sink) Reset()
Constants ¶
const ( // ConditionDeleted is a value for the "achilles_resource_readiness" metric's "type" label, indicating that the object // is in terminating state. ConditionDeleted = "Deleted" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func MustMakeMetrics ¶
func MustMakeMetrics(scheme *runtime.Scheme, registrar prometheus.Registerer) *Metrics
MustMakeMetrics creates a new Metrics with a new metrics Sink, and the Metrics.Scheme set to that of the given manager.
func (*Metrics) DeleteCondition ¶
func (m *Metrics) DeleteCondition(obj conditionedObject, conditionType api.ConditionType)
DeleteCondition deletes the status of the given conditionType for the given obj.
func (*Metrics) DeleteReadiness ¶
func (m *Metrics) DeleteReadiness(obj conditionedObject)
DeleteReadiness deletes the meta.ReadyCondition status metric for the given obj.
func (*Metrics) DeleteTrigger ¶
DeleteTrigger deletes an event trigger for the given triggered object and controller name.
func (*Metrics) RecordCondition ¶
func (m *Metrics) RecordCondition(obj conditionedObject, conditionType api.ConditionType)
RecordCondition records the status of the given conditionType for the given obj.
func (*Metrics) RecordReadiness ¶
func (m *Metrics) RecordReadiness(obj conditionedObject)
RecordReadiness records the meta.ReadyCondition status for the given obj.
func (*Metrics) RecordStateDuration ¶
func (m *Metrics) RecordStateDuration(gvk schema.GroupVersionKind, state string, duration time.Duration)
RecordStateDuration records the duration of the state for the given GVK.
func (*Metrics) RecordSuspend ¶
RecordSuspend records status of the object to be 1 if suspended and 0 if unsuspended
func (*Metrics) RecordTrigger ¶
func (m *Metrics) RecordTrigger( triggerGVK schema.GroupVersionKind, requestObjKey client.ObjectKey, event string, triggerType string, controllerName string, )
RecordTrigger records an event trigger for the given triggering object and triggered object.
type Sink ¶
type Sink struct {
// contains filtered or unexported fields
}
Sink is a prometheus metrics sink for standard achilles metrics.
func (*Sink) Collectors ¶
func (r *Sink) Collectors() []prometheus.Collector
Collectors returns a slice of Prometheus collectors, which can be used to register them in a metrics registry.
func (*Sink) DeleteCondition ¶
func (r *Sink) DeleteCondition( ref client.ObjectKey, gvk schema.GroupVersionKind, condition api.Condition, ) int
DeleteCondition deletes the status condition for the types True, False, and Deleted, for the specified object and condition. Returns the number of metrics deleted.
func (*Sink) DeleteTrigger ¶
DeleteTrigger deletes the trigger metric for the specified requested object and controller name, and ALL triggering GVKs, event types, and trigger types.
func (*Sink) RecordCondition ¶
func (r *Sink) RecordCondition( ref client.ObjectKey, gvk schema.GroupVersionKind, condition api.Condition, deleted bool, )
RecordCondition records the status condition for the types True, False, and Deleted, for the specified object and condition.
func (*Sink) RecordStateDuration ¶
func (r *Sink) RecordStateDuration( gvk schema.GroupVersionKind, state string, duration time.Duration, )
RecordStateDuration records the duration taken to execute a state in the FSM reconciler.
func (*Sink) RecordSuspend ¶
RecordSuspend records whether the object is suspended or not
func (*Sink) RecordTrigger ¶
func (r *Sink) RecordTrigger( triggerGVK schema.GroupVersionKind, requestObjKey client.ObjectKey, event string, triggerType string, controllerName string, )
RecordTrigger increments the counter for the given controller, qualified by the triggering object GVK and object ref and reconciled object ref.