Help us shape the future of Go! Take the 2026 Go Developer Survey

metricdata

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchQueryOpts

type BatchQueryOpts struct {
	// Specifies the metric data.
	Metrics []Metric `json:"metrics" required:"true"`

	// Specifies the start time of the query.
	From int64 `json:"from" required:"true"`

	// Specifies the end time of the query.
	To int64 `json:"to" required:"true"`

	// Specifies the data monitoring granularity.
	Period string `json:"period" required:"true"`

	// Specifies the data rollup method.
	Filter string `json:"filter" required:"true"`
}

BatchQueryOpts represents options for batch query metric data.

func (BatchQueryOpts) ToBatchQueryOptsMap

func (opts BatchQueryOpts) ToBatchQueryOptsMap() (map[string]interface{}, error)

ToBatchQueryOptsMap builds a request body from BatchQueryOpts.

type BatchQueryOptsBuilder

type BatchQueryOptsBuilder interface {
	ToBatchQueryOptsMap() (map[string]interface{}, error)
}

BatchQueryOptsBuilder allows extensions to add additional parameters to the BatchQuery request.

type Metric

type Metric struct {
	// Specifies the namespace in service.
	Namespace string `json:"namespace" required:"true"`

	// The value can be a string of 1 to 64 characters
	// and must start with a letter and contain only uppercase
	// letters, lowercase letters, digits, and underscores.
	MetricName string `json:"metric_name" required:"true"`

	// Specifies the list of the metric dimensions.
	Dimensions []map[string]string `json:"dimensions" required:"true"`
}

type MetricData

type MetricData struct {
	// Specifies the namespace in service.
	Namespace string `json:"namespace"`

	// The value can be a string of 1 to 64 characters
	// and must start with a letter and contain only uppercase
	// letters, lowercase letters, digits, and underscores.
	MetricName string `json:"metric_name"`

	//Specifies the list of the metric dimensions.
	Dimensions []map[string]interface{} `json:"dimensions"`

	// Specifies the metric data list.
	Datapoints []map[string]interface{} `json:"datapoints"`

	// Specifies the metric unit.
	Unit string `json:"unit"`
}

type MetricDatasResult

type MetricDatasResult struct {
	gophercloud.Result
}

func BatchQuery

Querying Monitoring Data in Batches.

func (MetricDatasResult) ExtractMetricDatas

func (r MetricDatasResult) ExtractMetricDatas() ([]MetricData, error)

ExtractMetricDatas is a function that accepts a result and extracts metric datas.

Directories

Path Synopsis
metricdata unit tests
metricdata unit tests

Jump to

Keyboard shortcuts

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