Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToInfluxPoint ¶
func ToInfluxPoint(point Point) *influxdb2Write.Point
Types ¶
type AuxiliaryTag ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func RunClient ¶
func RunClient(config Config, auxiliaryTags []AuxiliaryTag, localDb LocalDb, statistics Statistics) *Client
func (Client) WritePoint ¶
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) GetReceiverClientsNames ¶
func (p *ClientPool) GetReceiverClientsNames(receiverNames []string) (ret []string)
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 Url() string Token() string Org() string Bucket() string WriteInterval() time.Duration RetryInterval() time.Duration AggregateInterval() time.Duration TimePrecision() time.Duration ConnectTimeout() time.Duration BatchSize() uint RetryQueueLimit() uint LogDebug() bool }
type LocalDb ¶
type LocalDb interface { Enabled() bool InfluxBacklogAdd(client, batch string) error InfluxBacklogSize(client string) (numbBatches, numbLines uint, err error) InfluxBacklogGet(client string) (id int, batch string, err error) InfluxBacklogDelete(id int) error InfluxAggregateBacklog(client string, batchSize uint) error }
type Statistics ¶
type Statistics interface {
IncrementOne(module, name, field string)
}
Click to show internal directories.
Click to hide internal directories.