externalmetrics

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Monitor                string = "azuremonitor"
	ServiceBusSubscription string = "servicebussubscription"
)

Variables

This section is empty.

Functions

func IsInvalidMetricRequestError

func IsInvalidMetricRequestError(err error) bool

func TimeSpan

func TimeSpan() string

TimeSpan sets the default time to aggregate a metric

Types

type AzureClientFactory

type AzureClientFactory interface {
	GetAzureExternalMetricClient(clientType string) (AzureExternalMetricClient, error)
}

type AzureExternalMetricClient

type AzureExternalMetricClient interface {
	GetAzureMetric(azMetricRequest AzureExternalMetricRequest) (AzureExternalMetricResponse, error)
}

func NewMonitorClient

func NewMonitorClient(defaultsubscriptionID string) AzureExternalMetricClient

func NewServiceBusSubscriptionClient

func NewServiceBusSubscriptionClient(defaultSubscriptionID string) AzureExternalMetricClient

type AzureExternalMetricClientFactory

type AzureExternalMetricClientFactory struct {
	DefaultSubscriptionID string
}

func (AzureExternalMetricClientFactory) GetAzureExternalMetricClient

func (f AzureExternalMetricClientFactory) GetAzureExternalMetricClient(clientType string) (client AzureExternalMetricClient, err error)

type AzureExternalMetricClientProvider

type AzureExternalMetricClientProvider interface {
	NewClient(defaultSubscriptionID string)
}

type AzureExternalMetricRequest

type AzureExternalMetricRequest struct {
	MetricName                string
	SubscriptionID            string
	Type                      string
	ResourceName              string
	ResourceProviderNamespace string
	ResourceType              string
	Aggregation               string
	Timespan                  string
	Filter                    string
	ResourceGroup             string
	Namespace                 string
	Topic                     string
	Subscription              string
}

func ParseAzureMetric

func ParseAzureMetric(metricSelector labels.Selector, defaultSubscriptionID string) (AzureExternalMetricRequest, error)

func (AzureExternalMetricRequest) MetricResourceURI

func (amr AzureExternalMetricRequest) MetricResourceURI() string

func (AzureExternalMetricRequest) Validate

func (amr AzureExternalMetricRequest) Validate() error

type AzureExternalMetricResponse

type AzureExternalMetricResponse struct {
	Total float64
}

type InvalidMetricRequestError

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

func (InvalidMetricRequestError) Error

Jump to

Keyboard shortcuts

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