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 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