Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListMetrics ¶ added in v0.5.21
func ListMetrics(client *golangsdk.ServiceClient, opts ListMetricsBuilder) pagination.Pager
Types ¶
type ListMetricsBuilder ¶ added in v0.5.21
type ListMetricsRequest ¶ added in v0.5.21
type ListMetricsRequest struct {
// Specifies the dimension. For example, the ECS dimension is instance_id.
// For details about each service dimension, see Services Interconnected with Cloud Eye.
// A maximum of three dimensions are supported,
// and the dimensions are numbered from 0 in dim.{i}=key,value format.
// The key cannot exceed 32 characters and the value cannot exceed 256 characters.
// Single dimension: dim.0=instance_id,6f3c6f91-4b24-4e1b-b7d1-a94ac1cb011d
// Multiple dimensions: dim.0=key,value&dim.1=key,value。
Dim string `q:"dim,omitempty"`
// The value ranges from 1 to 1000, and is 1000 by default.
// This parameter is used to limit the number of query results.
Limit *int `q:"limit,omitempty"`
// Specifies the metric ID. For example, if the monitoring metric of an ECS is CPU usage, metric_name is cpu_util.
MetricName string `q:"metric_name,omitempty"`
// Query the namespace of a service.
Namespace string `q:"namespace,omitempty"`
// Specifies the result sorting method, which is sorted by timestamp.
// The default value is desc.
// asc: The query results are displayed in the ascending order.
// desc: The query results are displayed in the descending order.
Order string `q:"order,omitempty"`
// Specifies the paging start value.
// The format is namespace.metric_name.key:value.
Start string `q:"start,omitempty"`
}
func (ListMetricsRequest) ToMetricsListMap ¶ added in v0.5.21
func (opts ListMetricsRequest) ToMetricsListMap() (string, error)
type ListMetricsResponse ¶ added in v0.5.21
type ListMetricsResponse struct {
// Specifies the list of metric objects.
Metrics []MetricInfoList `json:"metrics"`
// Specifies the metadata of query results, including the pagination information.
MetaData MetaData `json:"meta_data"`
}
func ExtractAllPagesMetrics ¶
func ExtractAllPagesMetrics(r pagination.Page) (ListMetricsResponse, error)
func ExtractMetrics ¶
func ExtractMetrics(r pagination.Page) (ListMetricsResponse, error)
type ListResult ¶
type ListResult struct {
golangsdk.Result
}
type MetricInfoList ¶ added in v0.5.21
type MetricInfoList struct {
// Specifies the metric namespace.
Namespace string `json:"namespace"`
// Specifies the metric name, such as cpu_util.
MetricName string `json:"metric_name"`
// Specifies the metric unit.
Unit string `json:"unit"`
// Specifies the list of metric dimensions.
Dimensions []MetricsDimension `json:"dimensions"`
}
type MetricsDimension ¶ added in v0.5.21
type MetricsPage ¶
type MetricsPage struct {
pagination.LinkedPageBase
}
func (MetricsPage) IsEmpty ¶
func (r MetricsPage) IsEmpty() (bool, error)
func (MetricsPage) NextPageURL ¶
func (r MetricsPage) NextPageURL() (string, error)
func (MetricsPage) WrapNextPageURL ¶
func (r MetricsPage) WrapNextPageURL(start string) (string, error)
Click to show internal directories.
Click to hide internal directories.