Documentation ¶
Index ¶
- Constants
- func IsUrl(str string) bool
- func NewPrometheusAPI(metric v1alpha1.Metric) (v1.API, error)
- type Provider
- func (p *Provider) GarbageCollect(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, limit int) error
- func (p *Provider) GetMetadata(metric v1alpha1.Metric) map[string]string
- func (p *Provider) Resume(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, ...) v1alpha1.Measurement
- func (p *Provider) Run(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alpha1.Measurement
- func (p *Provider) Terminate(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric, ...) v1alpha1.Measurement
- func (p *Provider) Type() string
Constants ¶
View Source
const ( // ProviderType indicates the provider is prometheus ProviderType = "Prometheus" // ResolvedPrometheusQuery is used as the key for storing the resolved prometheus query in the metrics result // metadata object. ResolvedPrometheusQuery = "ResolvedPrometheusQuery" EnvVarArgoRolloutsPrometheusAddress = "ARGO_ROLLOUTS_PROMETHEUS_ADDRESS" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider contains all the required components to run a prometheus query
func NewPrometheusProvider ¶
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) GetMetadata ¶
GetMetadata returns any additional metadata which needs to be stored & displayed as part of the metrics result.
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 ¶
func (p *Provider) Run(run *v1alpha1.AnalysisRun, metric v1alpha1.Metric) v1alpha1.Measurement
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
Click to show internal directories.
Click to hide internal directories.