metric

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureMetric

func CaptureMetric(ctx context.Context, log logr.Logger, trial *optimizev1beta2.Trial, metric *optimizev1beta2.Metric, target runtime.Object) (float64, float64, error)

CaptureMetric captures a point-in-time metric value and it's error rate.

Types

type CaptureError

type CaptureError struct {
	// A description of what went wrong
	Message string
	// The URL that was used to capture the metric
	Address string
	// The metric query that failed
	Query string
	// The minimum amount of time until the metric is expected to be available
	RetryAfter time.Duration
}

CaptureError describes problems that arise while capturing Prometheus metric values.

func (*CaptureError) Error

func (e *CaptureError) Error() string

Jump to

Keyboard shortcuts

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