v2

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client defines a connection to an Influx Database

func (*Client) Close

func (this *Client) Close() error

Close releases any resources associated with the client connection

func (*Client) CreateDatabase

func (this *Client) CreateDatabase(name string, policy *influxdb.RetentionPolicy) error

func (*Client) CreateRetentionPolicy

func (this *Client) CreateRetentionPolicy(name string, policy *influxdb.RetentionPolicy) error

func (*Client) Database

func (this *Client) Database() string

Database returns the current database string

func (*Client) Do

func (this *Client) Do(query influxdb.Query) (influxdb.Results, error)

func (*Client) DropDatabase

func (this *Client) DropDatabase(name string) error

func (*Client) DropRetentionPolicy

func (this *Client) DropRetentionPolicy(name string) error

func (*Client) NewDataset

func (this *Client) NewDataset(name string, fields ...string) (influxdb.Dataset, error)

NewDataset returns an empty dataset object used for writing

func (*Client) Precision

func (this *Client) Precision() string

Precision returns the current precision value

func (*Client) RetentionPolicies

func (this *Client) RetentionPolicies() (map[string]*influxdb.RetentionPolicy, error)

func (*Client) SetDatabase

func (this *Client) SetDatabase(name string) error

SetDatabase sets the current database to use, will return ErrBadParameter if the database doesn't exist, or ErrNotConnected if the server is not connected

func (*Client) SetPrecision

func (this *Client) SetPrecision(value string) error

SetPrecision sets precision for setting and returning timestamps

func (*Client) String

func (this *Client) String() string

func (*Client) Version

func (this *Client) Version() string

Version returns the version string for the InfluxDB

func (*Client) Write

func (this *Client) Write(dataset influxdb.Dataset) error

type Config

type Config struct {
	Host      string
	Port      uint
	SSL       bool
	SSLVerify bool
	Database  string
	Username  string
	Password  string
	Precision string
	Timeout   time.Duration
}

Config defines the configuration parameters for connecting to Influx Database

func (Config) Open

func (config Config) Open(log gopi.Logger) (gopi.Driver, error)

Open returns an InfluxDB client object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL