influxdb
Index
- func NewClient(serverURL string, authToken string) *Client
- func NewClientWithOptions(serverURL string, authToken string, options Options) *Client
- func NewPointWithMeasurement(measurement string) *Point
- type Bucket
- type Client
- func NewClient(serverURL string, authToken string) *Client
- func NewClientWithOptions(serverURL string, authToken string, options Options) *Client
- func (c *Client) Bucket(org, bucket string) *Bucket
- func (c *Client) Ping() (bool, error)
- type Options
- type Point
Functions
func NewClient
1func NewClient(serverURL string, authToken string) *Client
NewClient creates Client for connecting to given serverURL with provided authentication token, with the default options. serverURL is the InfluxDB server base URL, e.g. http://localhost:8086, authToken is an authentication token.
func NewClientWithOptions
1func NewClientWithOptions(serverURL string, authToken string, options Options) *Client
NewClientWithOptions creates Client for connecting to given serverURL with provided authentication token and configured with custom Options. serverURL is the InfluxDB server base URL, e.g. http://localhost:8086, authToken is an authentication token.
func NewPointWithMeasurement
1func NewPointWithMeasurement(measurement string) *Point
NewPointWithMeasurement returns an empty point for the measurement with the time set to now. Use AddField and AddTag to add fields and tags to the point.
Types
type Bucket
1type Bucket struct {
2}
Bucket represents a bucket on the server and allows writing points to it.
func Write
1func (b *Bucket) Write(p ...*Point) error
WritePoint write one or more points into the bucket.
type Options
1type Options struct {
2 Tags map[string]string // A list of default tags
3 TLS *tls.Config
4 GZip bool
5}
Options holds configuration properties for communicating with InfluxDB server