output

package
v0.0.0-...-b03fc3e Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DummyDB = &InfluxDB{
	cfg:         nil,
	initialized: false,
	started:     false,
	dummy:       true,
	iChan:       nil,
	chExit:      nil,
	client:      nil,
	Sent:        0,
	Errors:      0,
}

Functions

func Ping

func Ping(cfg *config.InfluxCfg) (client.Client, time.Duration, string, error)

Ping InfluxDB Server

func SetLogger

func SetLogger(l *logrus.Logger)

SetLogger adds a logger to this module

Types

type InfluxDB

type InfluxDB struct {
	Sent   int64
	Errors int64
	// contains filtered or unexported fields
}

InfluxDB database export

func NewNotInitInfluxDB

func NewNotInitInfluxDB(c *config.InfluxCfg) *InfluxDB

NewNotInitInfluxDB Create Object in memory but not initialized until ready connection needed

func (*InfluxDB) BP

func (db *InfluxDB) BP() (*client.BatchPoints, error)

BP create a Batch point influx object

func (*InfluxDB) CheckAndSetInitialized

func (db *InfluxDB) CheckAndSetInitialized() bool

CheckAndSetInitialized check if this thread is already working and set if not

func (*InfluxDB) CheckAndSetStarted

func (db *InfluxDB) CheckAndSetStarted() bool

CheckAndSetStarted check if this thread is already working and set if not

func (*InfluxDB) CheckAndUnSetInitialized

func (db *InfluxDB) CheckAndUnSetInitialized() bool

CheckAndUnSetInitialized check if this thread is already working and set if not

func (*InfluxDB) CheckAndUnSetStarted

func (db *InfluxDB) CheckAndUnSetStarted() bool

CheckAndUnSetStarted check if this thread is already working and unset if not

func (*InfluxDB) Connect

func (db *InfluxDB) Connect() error

Connect to influxdb

func (*InfluxDB) End

func (db *InfluxDB) End()

func (*InfluxDB) Hostname

func (db *InfluxDB) Hostname() string

Hostname get hostname

func (*InfluxDB) Init

func (db *InfluxDB) Init()

Init initialies runtime info

func (*InfluxDB) IsStarted

func (db *InfluxDB) IsStarted() bool

IsStarted check if this thread is already working

func (*InfluxDB) Send

func (db *InfluxDB) Send(bps *client.BatchPoints)

Send send data

func (*InfluxDB) SetStartedAs

func (db *InfluxDB) SetStartedAs(st bool)

SetStartedAs change started state

func (*InfluxDB) StartSender

func (db *InfluxDB) StartSender(wg *sync.WaitGroup)

StartSender begins sender loop

func (*InfluxDB) StopSender

func (db *InfluxDB) StopSender()

End finalize sender goroutines

Jump to

Keyboard shortcuts

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