Documentation ¶
Overview ¶
Package db contains functions for communication with an InfluxDB host.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectOpts ¶
ConnectOpts allows defining options for a new client.
type ConnectionDetails ¶
ConnectionDetails contains details about the connection to an InfluxDB host.
type InfluxClient ¶
type InfluxClient struct { URL string // contains filtered or unexported fields }
InfluxClient is used to send R6 round data to an InfluxDB host.
func NewInfluxClient ¶
func NewInfluxClient(opts ConnectOpts) *InfluxClient
NewInfluxClient creates a new client with the provided options.
func (*InfluxClient) Close ¶
func (c *InfluxClient) Close()
Close calls the client's underlying Close function, finishing all asynchronous writes.
func (*InfluxClient) LoopAsync ¶ added in v0.5.0
func (c *InfluxClient) LoopAsync() <-chan InfluxEvent
LoopAsync starts a goroutine which pushes the data from the queue iteratively (FIFO) to the InfluxDB. It returns a channel used for providing event information.
func (*InfluxClient) ValidateConn ¶
func (c *InfluxClient) ValidateConn(timeout time.Duration) (details *ConnectionDetails, err error)
ValidateConn validates that the InfluxDB host can be reached, is healthy and that the client has write permissions.
type InfluxEvent ¶ added in v0.5.0
InfluxEvent contains data sent from the asynchronous loop started by LoopAsync. It contains the MatchID and RoundIndex for the related event and an Err field indicating success if nil.