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 ¶
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 ¶
func BatchQuery(client *gophercloud.ServiceClient, opts BatchQueryOptsBuilder) (r MetricDatasResult)
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.
Click to show internal directories.
Click to hide internal directories.