Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrNoValuesFound = errors.New("no values found")
)
Functions ¶
This section is empty.
Types ¶
type CloudWatchProvider ¶
type CloudWatchProvider struct {
// contains filtered or unexported fields
}
func NewCloudWatchProvider ¶
func NewCloudWatchProvider(metricInterval string, provider flaggerv1.MetricTemplateProvider) (*CloudWatchProvider, error)
NewCloudWatchProvider takes a metricInterval, a provider spec and the credentials map, and returns a cloudWatchProvider ready to execute queries against the AWS CloudWatch metrics
func (*CloudWatchProvider) IsOnline ¶
func (p *CloudWatchProvider) IsOnline() (bool, error)
IsOnline calls GetMetricData endpoint with the empty query and returns an error if the returned status code is NOT http.StatusBadRequests. For example, if the flagger does not have permission to perform `cloudwatch:GetMetricData`, the returned status code would be http.StatusForbidden
type DatadogProvider ¶
type DatadogProvider struct {
// contains filtered or unexported fields
}
DatadogProvider executes datadog queries
func NewDatadogProvider ¶
func NewDatadogProvider(metricInterval string, provider flaggerv1.MetricTemplateProvider, credentials map[string][]byte) (*DatadogProvider, error)
NewDatadogProvider takes a canary spec, a provider spec and the credentials map, and returns a Datadog client ready to execute queries against the API
func (*DatadogProvider) IsOnline ¶
func (p *DatadogProvider) IsOnline() (bool, error)
IsOnline calls the Datadog's validation endpoint with api keys and returns an error if the validation fails
type GraphiteProvider ¶ added in v1.10.0
type GraphiteProvider struct {
// contains filtered or unexported fields
}
GraphiteProvider executes Graphite render URL API queries.
func NewGraphiteProvider ¶ added in v1.10.0
func NewGraphiteProvider(provider flaggerv1.MetricTemplateProvider, credentials map[string][]byte) (*GraphiteProvider, error)
NewGraphiteProvider takes a provider spec and credentials map, validates the address, extracts the credentials map's username and password values if provided, and returns a Graphite client ready to execute queries against the Graphite render URL API.
func (*GraphiteProvider) IsOnline ¶ added in v1.10.0
func (g *GraphiteProvider) IsOnline() (bool, error)
IsOnline runs a simple Graphite render URL API query and returns an error if the API is unreachable.
type NewRelicProvider ¶
type NewRelicProvider struct {
// contains filtered or unexported fields
}
NewRelicProvider executes newrelic queries
func NewNewRelicProvider ¶
func NewNewRelicProvider( metricInterval string, provider flaggerv1.MetricTemplateProvider, credentials map[string][]byte, ) (*NewRelicProvider, error)
NewNewRelicProvider takes a canary spec, a provider spec and the credentials map, and returns a NewRelic client ready to execute queries against the Insights API
func (*NewRelicProvider) IsOnline ¶
func (p *NewRelicProvider) IsOnline() (bool, error)
IsOnline calls the NewRelic's insights API with and returns an error if the request is rejected
type PrometheusProvider ¶
type PrometheusProvider struct {
// contains filtered or unexported fields
}
PrometheusProvider executes promQL queries
func NewPrometheusProvider ¶
func NewPrometheusProvider(provider flaggerv1.MetricTemplateProvider, credentials map[string][]byte) (*PrometheusProvider, error)
NewPrometheusProvider takes a provider spec and the credentials map, validates the address, extracts the username and password values if provided and returns a Prometheus client ready to execute queries against the API
func (*PrometheusProvider) IsOnline ¶
func (p *PrometheusProvider) IsOnline() (bool, error)
IsOnline run simple Prometheus query and returns an error if the API is unreachable