Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
Recorder is a struct for recording GitOps Toolkit metrics for a controller.
Use NewRecorder to initialise it with properly configured metric names.
func (*Recorder) Collectors ¶
func (r *Recorder) Collectors() []prometheus.Collector
Collectors returns a slice of Prometheus collectors, which can be used to register them in a metrics registry.
func (*Recorder) RecordDuration ¶
RecordDuration records the duration since start for the given ref.
func (*Recorder) RecordStatus ¶
func (r *Recorder) RecordStatus(name string, namespace string, status v1alpha1.TerraformRunStatus)
RecordStatus records the status for a given terraform workflow/run
func (*Recorder) RecordTotal ¶
RecordTotal records the total number of submitted workflows
type RecorderInterface ¶
type RecorderInterface interface { RecordTotal(name string, namespace string) RecordStatus(name string, namespace string, status v1alpha1.TerraformRunStatus) RecordDuration(name string, namespace string, start time.Time) Collectors() []prometheus.Collector }
RecorderInterface is an interface that holds the functions used by the recorder struct
func NewRecorder ¶
func NewRecorder() RecorderInterface
NewRecorder returns a new Recorder with all metric names configured confirm GitOps Toolkit standards.