metrics

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotExist  = errors.New("metrics is not exist")
	ErrWrongType = errors.New("metrics type is wrong")
)
View Source
var (
	RunnerPoolSecretRetryCount *prometheus.GaugeVec
)

Controller related metrics

Functions

func DeleteRunnerMetrics

func DeleteRunnerMetrics(runnerpool, runner string)

func DeleteRunnerPoolMetrics

func DeleteRunnerPoolMetrics(runnerpool string)

func IncrementListenerExitState

func IncrementListenerExitState(state string)

func InitControllerMetrics

func InitControllerMetrics(registry prometheus.Registerer)

func InitRunnerPodMetrics

func InitRunnerPodMetrics(registry prometheus.Registerer, name string)

func UpdateRunnerMetrics

func UpdateRunnerMetrics(runnerpool, runner string, online, busy bool)

func UpdateRunnerPodState

func UpdateRunnerPodState(curState string)

func UpdateRunnerPoolMetrics

func UpdateRunnerPoolMetrics(runnerpool string, replicas int)

Types

type Gauge

type Gauge struct {
	Label map[string]string
	Value float64
}

func FetchGauge

func FetchGauge(ctx context.Context, url, name string) ([]*Gauge, error)

FetchGauge fetches a gauge metrics. This is a helper function for tests.

Jump to

Keyboard shortcuts

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