metrics

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 8 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.CounterVec
)

Controller related metrics

Functions

func DeleteAllRunnerMetrics added in v0.5.0

func DeleteAllRunnerMetrics(runnerpool string)

func DeleteRunnerMetrics

func DeleteRunnerMetrics(runnerpool string, runners ...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