Documentation ¶
Overview ¶
Package statemetrics contains utilities for recording Crossplane resource state metrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MRStateMetrics ¶
type MRStateMetrics struct { Exists *prometheus.GaugeVec Ready *prometheus.GaugeVec Synced *prometheus.GaugeVec }
MRStateMetrics holds Prometheus metrics for managed resources.
func NewMRStateMetrics ¶
func NewMRStateMetrics() *MRStateMetrics
NewMRStateMetrics returns a new MRStateMetrics.
func (*MRStateMetrics) Collect ¶
func (r *MRStateMetrics) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics. The implementation sends each collected metric via the provided channel and returns once the last metric has been sent.
func (*MRStateMetrics) Describe ¶
func (r *MRStateMetrics) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector to the provided channel and returns once the last descriptor has been sent.
type MRStateRecorder ¶
type MRStateRecorder struct {
// contains filtered or unexported fields
}
A MRStateRecorder records the state of managed resources.
func NewMRStateRecorder ¶
func NewMRStateRecorder(c client.Client, log logging.Logger, metrics *MRStateMetrics, managedList resource.ManagedList, interval time.Duration) *MRStateRecorder
NewMRStateRecorder returns a new MRStateRecorder which records the state of managed resources.
type NopStateRecorder ¶
type NopStateRecorder struct{}
A NopStateRecorder does nothing.
func NewNopStateRecorder ¶
func NewNopStateRecorder() *NopStateRecorder
NewNopStateRecorder returns a NopStateRecorder that does nothing.
func (*NopStateRecorder) Record ¶
func (r *NopStateRecorder) Record(_ context.Context, _ schema.GroupVersionKind)
Record does nothing.
type StateRecorder ¶
type StateRecorder interface { Record(ctx context.Context, gvk schema.GroupVersionKind) Start(ctx context.Context) error }
A StateRecorder records the state of given GroupVersionKind.