Documentation ¶
Index ¶
- Variables
- func ExecuteQuery(c *clientv1.Client, query string) (*clientv1.Response, error)
- func LoadConfig()
- func NewClientWithTimeout(timeout time.Duration) (*clientv1.Client, error)
- func NewHTTPClient() (client.Client, error)
- func Query(query string) (*client.Response, error)
- func QueryAverageTemperature(period time.Duration, probe int32) (*models.TemperatureReading, error)
- func WritePoint(name string, tags map[string]string, fields map[string]interface{}) (*client.Point, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Settings *influxDBSettings
Settings holds all pertient connection parameters for InfluxDB
Functions ¶
func ExecuteQuery ¶
ExecuteQuery executes the given query against the database and returns the response or an error
func LoadConfig ¶
func LoadConfig()
LoadConfig (re)loads the influxDB config so a connection can be initialized
func NewClientWithTimeout ¶
NewClientWithTimeout will retry pinging the server until a specified timeout passes
func NewHTTPClient ¶
func NewHTTPClient() (client.Client, error)
NewHTTPClient creates a new client for reading & writing data to influxDB over HTTP
func QueryAverageTemperature ¶
QueryAverageTemperature retrieves the average temperature over the given period for the requested probe from InfluxDB
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.