monitor

package
v0.0.0-...-d999168 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MonitorHost = "monitor.api.qcloud.com"
	MonitorPath = "/v2/index.php"
)
View Source
const (
	NameSpaceQceDocker = "qce/docker"
	NameSpaceQceCvm    = "qce/cvm"

	QCloudMonitorAPITimeTemplate = "2006-01-02 15:04:05"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	Dimensions []Dimension `qcloud_arg:"dimensions"`
}

type BatchGetMonitorDataArgs

type BatchGetMonitorDataArgs struct {
	Namespace  string                `qcloud_arg:"namespace"`
	MetricName string                `qcloud_arg:"metricName"`
	Batch      []Batch               `qcloud_arg:"batch"`
	Period     *int                  `qcloud_arg:"period,omitempty"`
	StartTime  *QCloudMonitorAPITime `qcloud_arg:"startTime,omitempty"`
	EndTime    *QCloudMonitorAPITime `qcloud_arg:"endTime,omitempty"`
}

type BatchGetMonitorDataResponse

type BatchGetMonitorDataResponse struct {
	StartTime  QCloudMonitorAPITime  `json:"startTime"`
	EndTime    QCloudMonitorAPITime  `json:"endTime"`
	MetricName string                `json:"metricName"`
	Period     int                   `json:"period"`
	DataPoints map[string][]*float64 `json:"dataPoints"`
}

type Client

type Client struct {
	*common.Client
}

func NewClient

func NewClient(credential common.CredentialInterface, opts common.Opts) (*Client, error)

func NewClientFromEnv

func NewClientFromEnv() (*Client, error)

func (*Client) BatchGetMonitorData

func (client *Client) BatchGetMonitorData(args *BatchGetMonitorDataArgs) (*BatchGetMonitorDataResponse, error)

func (*Client) GetMonitorData

func (client *Client) GetMonitorData(args *GetMonitorDataArgs) (*GetMonitorDataResponse, error)

type Dimension

type Dimension struct {
	Name  string `qcloud_arg:"name"`
	Value string `qcloud_arg:"value"`
}

type GetMonitorDataArgs

type GetMonitorDataArgs struct {
	Namespace  string                `qcloud_arg:"namespace"`
	MetricName string                `qcloud_arg:"metricName"`
	Dimensions []Dimension           `qcloud_arg:"dimensions"`
	Period     *int                  `qcloud_arg:"period,omitempty"`
	StartTime  *QCloudMonitorAPITime `qcloud_arg:"startTime,omitempty"`
	EndTime    *QCloudMonitorAPITime `qcloud_arg:"endTime,omitempty"`
}

type GetMonitorDataResponse

type GetMonitorDataResponse struct {
	StartTime  QCloudMonitorAPITime `json:"startTime"`
	EndTime    QCloudMonitorAPITime `json:"endTime"`
	MetricName string               `json:"metricName"`
	Period     int                  `json:"period"`
	DataPoints []*float64           `json:"dataPoints"`
}

type QCloudMonitorAPITime

type QCloudMonitorAPITime struct {
	time.Time
}

func (*QCloudMonitorAPITime) EncodeStructWithPrefix

func (qmat *QCloudMonitorAPITime) EncodeStructWithPrefix(prefix string, val reflect.Value, v *url.Values) error

func (*QCloudMonitorAPITime) MarshalJSON

func (qmat *QCloudMonitorAPITime) MarshalJSON() ([]byte, error)

func (*QCloudMonitorAPITime) UnmarshalJSON

func (qmat *QCloudMonitorAPITime) UnmarshalJSON(b []byte) error

type Response

type Response struct {
	Code     int    `json:"code"`
	Message  string `json:"message"`
	CodeDesc string `json:"codeDesc"`
}

Jump to

Keyboard shortcuts

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