client

package
v0.0.0-...-83bb8e0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllNamespaces

func AllNamespaces() map[string]string

AllNamespaces return allNamespaces

Types

type Datapoint

type Datapoint map[string]interface{}

Datapoint datapoint

func (Datapoint) Get

func (d Datapoint) Get(measure string) float64

Get return value for measure

func (Datapoint) Labels

func (d Datapoint) Labels() []string

Labels return labels that not in ignores

func (Datapoint) Values

func (d Datapoint) Values(labels ...string) []string

Values return values for lables

type MetricClient

type MetricClient struct {
	// contains filtered or unexported fields
}

MetricClient wrap cms.client

func NewMetricClient

func NewMetricClient(cloudID, ak, secret, region string, logger log.Logger) (*MetricClient, error)

NewMetricClient create metric Client

func (*MetricClient) Collect

func (c *MetricClient) Collect(namespace string, sub string, m *config.Metric, ch chan<- prometheus.Metric)

Collect do collect metrics into channel

func (*MetricClient) DescribeMetricMetaList

func (c *MetricClient) DescribeMetricMetaList(namespaces ...string) (map[string][]cms.Resource, error)

DescribeMetricMetaList return metrics meta list

func (*MetricClient) SetTransport

func (c *MetricClient) SetTransport(rate int)

Jump to

Keyboard shortcuts

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