taskrunmetrics

package
v0.20.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithClient

func WithClient(ctx context.Context) context.Context

WithClient adds a metrics recorder to the given context

Types

type Recorder

type Recorder struct {
	// contains filtered or unexported fields
}

Recorder is used to actually record TaskRun metrics

func Get

func Get(ctx context.Context) *Recorder

Get extracts the taskrunmetrics.Recorder from the context.

func NewRecorder

func NewRecorder(ctx context.Context) (*Recorder, error)

NewRecorder creates a new metrics recorder instance to log the TaskRun related metrics

func (*Recorder) RecordCountMetrics

func (r *Recorder) RecordCountMetrics(ctx context.Context, metricType string)

type RecorderKey

type RecorderKey struct{}

RecorderKey is used for associating the Recorder inside the context.Context.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL