Documentation
¶
Index ¶
- Variables
- func ResetRecorder()
- func WithClient(ctx context.Context) context.Context
- func WithInformer(ctx context.Context) (context.Context, controller.Informer)
- type InformerKey
- type Recorder
- func (r *Recorder) Count(provider, event, namespace, repository string) error
- func (r *Recorder) CountPRDuration(namespace, repository, status, reason string, duration time.Duration) error
- func (r *Recorder) EmitRunningPRsMetrics(prl []*tektonv1.PipelineRun) error
- func (r *Recorder) ReportRunningPipelineRuns(ctx context.Context, lister listers.PipelineRunLister)
- func (r *Recorder) RunningPipelineRuns(namespace, repository string, runningPRs float64) error
- type RecorderKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Once sync.Once R *Recorder ErrRegistering error )
Functions ¶
func ResetRecorder ¶ added in v0.29.0
func ResetRecorder()
func WithClient ¶ added in v0.29.0
WithClient adds a metrics recorder to the given context.
func WithInformer ¶ added in v0.29.0
WithInformer returns the given context, and a configured informer.
Types ¶
type InformerKey ¶ added in v0.29.0
type InformerKey struct{}
InformerKey is used for associating the Informer inside the context.Context.
type Recorder ¶
Recorder holds keys for metrics.
func NewRecorder ¶
NewRecorder creates a new metrics recorder instance to log the PAC PipelineRun related metrics.
func (*Recorder) CountPRDuration ¶ added in v0.29.0
func (r *Recorder) CountPRDuration(namespace, repository, status, reason string, duration time.Duration) error
CountPRDuration collects duration taken by a pipelinerun in seconds accumulate them in prDurationCount.
func (*Recorder) EmitRunningPRsMetrics ¶ added in v0.29.0
func (r *Recorder) EmitRunningPRsMetrics(prl []*tektonv1.PipelineRun) error
func (*Recorder) ReportRunningPipelineRuns ¶ added in v0.29.0
func (r *Recorder) ReportRunningPipelineRuns(ctx context.Context, lister listers.PipelineRunLister)
ReportRunningPipelineRuns reports running PipelineRuns on our configured ReportingPeriod until the context is cancelled.
type RecorderKey ¶ added in v0.29.0
type RecorderKey struct{}
RecorderKey is used for associating the Recorder inside the context.Context.
Click to show internal directories.
Click to hide internal directories.