monitor

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 AzureMetricRequest

type AzureMetricRequest struct {
	MetricName                string
	ResourceGroup             string
	ResourceName              string
	ResourceProviderNamespace string
	ResourceType              string
	Aggregation               string
	Timespan                  string
	Filter                    string
	SubscriptionID            string
}

func ParseAzureMetric

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

func (AzureMetricRequest) MetricResourceURI

func (amr AzureMetricRequest) MetricResourceURI() string

func (AzureMetricRequest) Validate

func (amr AzureMetricRequest) Validate() error

type AzureMetricResponse

type AzureMetricResponse struct {
	Total float64
}

type AzureMonitorClient

type AzureMonitorClient interface {
	GetAzureMetric(azMetricRequest AzureMetricRequest) (AzureMetricResponse, error)
}

AzureMonitorClient provides an interface to make requests to Azure Monitor

func NewClient

func NewClient(defaultsubscriptionID string) AzureMonitorClient

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