Documentation ¶
Index ¶
- Constants
- func WorkerGenerator(jobs chan collector.Printable, connection, index, dumpFile, version string, ...) func(workerId int) *Worker
- type Connector
- func (connector *Connector) AddWorker()
- func (connector Connector) AmountWorkers() int
- func (connector Connector) DatabaseExists() bool
- func (connector Connector) IsAlive() bool
- func (connector *Connector) RemoveWorker()
- func (connector *Connector) Stop()
- func (connector *Connector) TestIfIsAlive() bool
- func (connector *Connector) TestTemplateExists() bool
- type JSONResult
- type Worker
Constants ¶
View Source
const NagfluxTemplate = `` /* 2490-byte string literal not displayed */
NagfluxTemplate creates a template for settings and mapping for nagflux indices.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector makes the basic connection to an influxdb.
func ConnectorFactory ¶
func ConnectorFactory(jobs chan collector.Printable, connectionHost, index, dumpFile, version string, workerAmount, maxWorkers int, createDatabaseIfNotExists bool) *Connector
ConnectorFactory Constructor which will create some workers if the connection is established.
func (*Connector) AddWorker ¶
func (connector *Connector) AddWorker()
AddWorker creates a new worker
func (Connector) AmountWorkers ¶
AmountWorkers current amount of workers.
func (Connector) DatabaseExists ¶
DatabaseExists does the database exist.
func (*Connector) RemoveWorker ¶
func (connector *Connector) RemoveWorker()
RemoveWorker stops a worker
func (*Connector) TestIfIsAlive ¶
TestIfIsAlive test active if the database system is alive.
func (*Connector) TestTemplateExists ¶
TestTemplateExists test active if the template exists.
type JSONResult ¶
type JSONResult struct { Errors bool `json:"errors"` Items []struct { Create struct { ID string `json:"_id"` Index string `json:"_index"` Type string `json:"_type"` Error struct { CausedBy struct { Reason string `json:"reason"` Type string `json:"type"` } `json:"caused_by"` Reason string `json:"reason"` Type string `json:"type"` } `json:"error"` Shards struct { Failed int `json:"failed"` Successful int `json:"successful"` Total int `json:"total"` } `json:"_shards"` Version int `json:"_version"` Status int `json:"status"` } `json:"create"` } `json:"items"` Took int `json:"took"` }
JSONResult is the JSON object returned from an bulk request
Click to show internal directories.
Click to hide internal directories.