opentsdb

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: GPL-3.0 Imports: 5 Imported by: 1 module, 1 package

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 ArrayItem

type ArrayItem struct {
	Metric    string
	Timestamp int64
	Value     float64
	Tags      []interface{}
}

ArrayItem - an array of parameters

type Serializer

type Serializer struct {
	serializer.Serializer
	// contains filtered or unexported fields
}

Serializer - the json serializer

func New

func New(bufferSize int) *Serializer

New - creates a new JSON serializer

func (*Serializer) Serialize

func (s *Serializer) Serialize(metric string, timestamp int64, value float64, tags ...interface{}) (string, error)

Serialize - serializes an opentsdb data line

func (*Serializer) SerializeArray

func (s *Serializer) SerializeArray(items ...*ArrayItem) (string, error)

SerializeArray - serializes an array of opentsdb data lines

func (*Serializer) SerializeGeneric added in v1.2.1

func (s *Serializer) SerializeGeneric(item interface{}) (string, error)

SerializeGeneric - serializes with the correct cast based on the struct ArrayItem

func (*Serializer) SerializeGenericArray added in v1.2.1

func (s *Serializer) SerializeGenericArray(items ...interface{}) (string, error)

SerializeGenericArray - serializes with the correct cast based on the struct ArrayItem

Jump to

Keyboard shortcuts

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