Version: v1.0.0 Latest Latest

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

Go to latest
Published: Jan 19, 2019 License: MIT Imports: 6 Imported by: 0




View Source
const ErrorDelayMax = time.Minute
View Source
const ErrorDelayMin = time.Second


This section is empty.


func ToInfluxPoint

func ToInfluxPoint(point Point) (*influxClient.Point, error)


type Client

type Client struct {
	// contains filtered or unexported fields

func RunClient

func RunClient(config Config, statistics Statistics) (*Client, error)

func (Client) Name

func (ic Client) Name() string

func (Client) ServerVersion

func (ic Client) ServerVersion() string

func (*Client) Shutdown

func (ic *Client) Shutdown()

type ClientPool

type ClientPool struct {
	// contains filtered or unexported fields

func RunPool

func RunPool() (pool *ClientPool)

func (*ClientPool) AddClient

func (p *ClientPool) AddClient(client *Client)

func (*ClientPool) RemoveClient

func (p *ClientPool) RemoveClient(client *Client)

func (*ClientPool) Shutdown

func (p *ClientPool) Shutdown()

func (*ClientPool) WritePoint

func (p *ClientPool) WritePoint(point Point, receiverNames []string)

type Config

type Config interface {
	Name() string
	Address() string
	User() string
	Password() string
	Database() string
	WriteInterval() time.Duration
	TimePrecision() time.Duration
	LogLineProtocol() bool

type Point

type Point interface {
	Measurement() string
	Tags() map[string]string
	Fields() map[string]interface{}
	Time() time.Time

type Statistics

type Statistics interface {
	IncrementOne(module, name, field string)

Jump to

Keyboard shortcuts

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