mpcmetrics

package
v0.0.0-...-e0c7bbe Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsSubsystem = "multi_platform_controller"
)

Variables

This section is empty.

Functions

func CountAvailabilityError

func CountAvailabilityError(platform string)

func CountAvailabilitySuccess

func CountAvailabilitySuccess(platform string)

func HandleMetrics

func HandleMetrics(platform string, f func(*PlatformMetrics))

func RegisterCommonMetrics

func RegisterCommonMetrics(ctx context.Context, registerer prometheus.Registerer) error

func RegisterPlatformMetrics

func RegisterPlatformMetrics(_ context.Context, platform string) error

Types

type AvailabilityProbe

type AvailabilityProbe interface {
	CheckAvailability(ctx context.Context) error
	Success()
	Failure()
}

AvailabilityProbe represents a probe that checks the availability of a certain aspects of the service

func NewBackendProbe

func NewBackendProbe() AvailabilityProbe

type BackendProbe

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

func (*BackendProbe) CheckAvailability

func (q *BackendProbe) CheckAvailability(_ context.Context) error

func (*BackendProbe) Failure

func (q *BackendProbe) Failure()

func (*BackendProbe) Success

func (q *BackendProbe) Success()

type PlatformMetrics

type PlatformMetrics struct {
	AllocationTime         prometheus.Histogram
	WaitTime               prometheus.Histogram
	TaskRunTime            prometheus.Histogram
	RunningTasks           prometheus.Gauge
	WaitingTasks           prometheus.Gauge
	ProvisionFailures      prometheus.Counter
	CleanupFailures        prometheus.Counter
	HostAllocationFailures prometheus.Counter
}

PlatformMetrics set of per-platform metrics

Jump to

Keyboard shortcuts

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