Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderFactories = map[ProviderType]ProviderFactory{ "aws": func() (Provider, error) { return aws.NewAwsCloudWatch() }, "gcp": func() (Provider, error) { return gcp.NewGCP() }, }
Functions ¶
func ResourceIDFromSelector ¶ added in v0.18.0
ResourceFromSelector - identifies the resource ID from the given selector returns empty string if resource cannot be determined
Types ¶
type Provider ¶
type Provider interface { Get99PercentLatencyMetricForResource(resourceID string, from, to time.Time) (float64, error) GetErrorPercentageMetricForResource(resourceID string, from, to time.Time) (float64, error) GetLatencyAboveThresholdPercentage(resourceID string, from, to time.Time, threshold int) (float64, error) GetAvailabilityPercentage(resourceID string, from, to time.Time) (float64, error) // Note that this function must return an empty // string if resource cannot be determined ResourceFromSelector(entities.Selector) string Close() error // providers must explicitly be closed once not needed anymore }
func FromSelector ¶ added in v0.18.0
FromSelector - identifies provider from Objective returns nil if provider cannot be identified
type ProviderFactory ¶
type ProviderType ¶ added in v0.18.0
type ProviderType string
const ( AWSProvider ProviderType = "aws" GCPProvider ProviderType = "gcp" )
Click to show internal directories.
Click to hide internal directories.