metric

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Logger       *zap.Logger //日志组件
	Host         string      `json:"host"`
	AccessKey    string      `json:"access_key"`
	AccessSecret string      `json:"access_secret"`
}

func NewClient

func NewClient() *Client

func (*Client) GenSignString

func (c *Client) GenSignString(contentMd5, contentDate string) string

func (*Client) HostStr

func (c *Client) HostStr() string

func (*Client) InitAccess

func (c *Client) InitAccess(key, secret string) *Client

func (*Client) InitHost

func (c *Client) InitHost(host string) *Client

func (*Client) InitLogger

func (c *Client) InitLogger(logger *zap.Logger) *Client

func (*Client) Push

func (c *Client) Push(m []Metric) error

type MValue

type MValue struct {
	Value int `json:"value"`
}

type Metric

type Metric struct {
	Dimensions map[string]string `json:"dimensions"`
	GroupId    int               `json:"groupId"`
	MetricName string            `json:"metricName"`
	Period     int               `json:"period"`
	Time       int64             `json:"time"`
	Type       int               `json:"type"`
	Values     *MValue           `json:"values"`
}

type Response

type Response struct {
	Code string `json:"code"`
	Msg  string `json:"msg"`
}

Jump to

Keyboard shortcuts

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