metrics

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldDefine

type FieldDefine struct {
	Key    string         `json:"key"`
	Type   string         `json:"type"`
	Name   string         `json:"name"`
	Unit   string         `json:"uint"`
	Values []*ValueDefine `json:"values,omitempty"`
}

FieldDefine .

type Metric

type Metric struct {
	Name      string                 `json:"name"`
	Timestamp int64                  `json:"timestamp"`
	Tags      map[string]string      `json:"tags"`
	Fields    map[string]interface{} `json:"fields"`
}

Metric .

func New

func New() *Metric

New .

func (*Metric) Copy

func (m *Metric) Copy() *Metric

Copy instance

func (*Metric) String

func (m *Metric) String() string

type MetricMeta

type MetricMeta struct {
	Name   NameDefine              `json:"name"`
	Labels map[string]string       `json:"labels,omitempty"`
	Tags   map[string]*TagDefine   `json:"tags"`
	Fields map[string]*FieldDefine `json:"fields"`
}

MetricMeta .

func NewMeta

func NewMeta() *MetricMeta

NewMeta .

func (*MetricMeta) FieldsKeys

func (m *MetricMeta) FieldsKeys() []string

FieldsKeys .

func (*MetricMeta) TagsKeys

func (m *MetricMeta) TagsKeys() []string

TagsKeys .

type NameDefine

type NameDefine struct {
	Key  string `json:"key" `
	Name string `json:"name"`
}

NameDefine .

type TagDefine

type TagDefine struct {
	Key    string         `json:"key"`
	Name   string         `json:"name"`
	Values []*ValueDefine `json:"values,omitempty"`
}

TagDefine .

type ValueDefine

type ValueDefine struct {
	Value interface{} `json:"value"`
	Name  string      `json:"name"`
}

ValueDefine .

Jump to

Keyboard shortcuts

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