prometheus

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ProviderType indicates the provider is prometheus
	ProviderType = "Prometheus"
)

Variables

This section is empty.

Functions

func NewPrometheusAPI

func NewPrometheusAPI(metric v1alpha1.Metric) (v1.API, error)

NewPrometheusAPI generates a prometheus API from the metric configuration

Types

type Provider

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

Provider contains all the required components to run a prometheus query

func NewPrometheusProvider

func NewPrometheusProvider(api v1.API, logCtx log.Entry) *Provider

NewPrometheusProvider Creates a new Prometheus client

func (*Provider) GarbageCollect

func (p *Provider) GarbageCollect(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, limit int) error

GarbageCollect is a no-op for the prometheus provider

func (*Provider) Resume

func (p *Provider) Resume(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, measurement v1alpha1.Measurement) v1alpha1.Measurement

Resume should not be used the prometheus provider since all the work should occur in the Run method

func (*Provider) Run

Run queries prometheus for the metric

func (*Provider) Terminate

func (p *Provider) Terminate(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, measurement v1alpha1.Measurement) v1alpha1.Measurement

Terminate should not be used the prometheus provider since all the work should occur in the Run method

func (*Provider) Type

func (p *Provider) Type() string

Type incidates provider is a prometheus provider

Jump to

Keyboard shortcuts

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