metrics

package
v0.0.0-...-e67e6ae Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMessage

func NewMessage(data interface{}) (xstream.Message, error)

Types

type CounterVec

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

func NewCounterVec

func NewCounterVec(optFuns ...VecOptFn) *CounterVec

func (*CounterVec) GetMetricWith

func (v *CounterVec) GetMetricWith(key interface{}) metrics.Counter

func (*CounterVec) Run

func (v *CounterVec) Run(ctx context.Context)

type IoTMetricValue

type IoTMetricValue struct {
	UserID    string      `json:"user_id"`
	DeviceID  string      `json:"device_id"`
	Timestamp int64       `json:"timestamp"`
	Source    string      `json:"source"`
	Action    string      `json:"action"`
	Value     interface{} `json:"value"`
	Step      int64       `json:"step"`
	Type      string      `json:"counterType"`
}

type MetricValue

type MetricValue struct {
	Endpoint  string      `json:"endpoint"`
	Metric    string      `json:"metric"`
	Value     interface{} `json:"value"`
	Step      int64       `json:"step"`
	Type      string      `json:"counterType"`
	Tags      string      `json:"tags"`
	Timestamp int64       `json:"timestamp"`
}

type VecOptFn

type VecOptFn func(*VecOpts)

func ReportFunc

func ReportFunc(fn func(k string, v interface{})) VecOptFn

func ReportStep

func ReportStep(stepSec int) VecOptFn

type VecOpts

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

Jump to

Keyboard shortcuts

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