influxdb

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Codes = map[byte][]byte{
		',': []byte(`\,`),
		'"': []byte(`\"`),
		' ': []byte(`\ `),
		'=': []byte(`\=`),
	}
)

Functions

func CreateInfluxdbDatabase

func CreateInfluxdbDatabase(host, database, sender string) (err error)

func CreateInfluxdbRetention

func CreateInfluxdbRetention(host, database, retention, duration, sender string) (err error)

func MakeKey

func MakeKey(name []byte, tags Tags) []byte

MakeKey creates a key for a set of tags.

func NewSender

func NewSender(c conf.MapConf) (influxdbSender sender.Sender, err error)

influxdb sender

func String

func String(in string) string

func UnescapeString

func UnescapeString(in string) string

Types

type Point

type Point struct {
	Measurement string
	Tags        map[string]string
	Fields      map[string]interface{}
	Time        int64
}

func (*Point) GetFields

func (p *Point) GetFields() []byte

func (*Point) Key

func (p *Point) Key() []byte

func (*Point) String

func (p *Point) String() string

type Points

type Points []Point

func (Points) Buffer

func (ps Points) Buffer() []byte

type Sender

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

Sender write datas into influxdb

func (*Sender) Close

func (s *Sender) Close() error

func (*Sender) Name

func (s *Sender) Name() string

func (*Sender) Send

func (s *Sender) Send(datas []Data) error

func (*Sender) SkipDeepCopy

func (*Sender) SkipDeepCopy() bool

type Tags

type Tags map[string]string

func (Tags) HashKey

func (t Tags) HashKey() []byte

HashKey hashes all of a tag's keys.

Jump to

Keyboard shortcuts

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