Documentation ¶
Index ¶
- type ClientOption
- type FieldKey
- type InfluxdbClient
- func (client *InfluxdbClient) Databases() ([]string, error)
- func (client *InfluxdbClient) Fields(database string, measurements []string) (map[string][]FieldKey, error)
- func (client *InfluxdbClient) Measurements(database string) ([]string, error)
- func (client *InfluxdbClient) Query(sql, database, precision string) ([]influxmodels.Row, error)
- func (client *InfluxdbClient) Request(sql, database, precision string) (*influxdb.Response, error)
- func (client *InfluxdbClient) Tags(database string, measurements []string) (map[string][]string, error)
- func (client *InfluxdbClient) WaitExit()
- func (client *InfluxdbClient) Write(database, rp string, points []*influxdb.Point) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOption ¶
type ClientOption func(client *InfluxdbClient)
func WithAddr ¶
func WithAddr(addr string) ClientOption
func WithBlockOnError ¶
func WithBlockOnError() ClientOption
func WithMaxCachePoint ¶
func WithMaxCachePoint(max int) ClientOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
type FieldKey ¶
FieldKey represents a result's structure from influxdb with query `SHOW FIELD KEYS FROM ...`
type InfluxdbClient ¶
type InfluxdbClient struct {
// contains filtered or unexported fields
}
InfluxdbClient station
func NewInfluxdbClient ¶
func NewInfluxdbClient(ctx context.Context, options ...ClientOption) (*InfluxdbClient, error)
New InfluxDB component
func (*InfluxdbClient) Databases ¶
func (client *InfluxdbClient) Databases() ([]string, error)
Databases return the database list on influxdb
func (*InfluxdbClient) Fields ¶
func (client *InfluxdbClient) Fields(database string, measurements []string) (map[string][]FieldKey, error)
Fields get all tag keys from influxdb in given measurements
func (*InfluxdbClient) Measurements ¶
func (client *InfluxdbClient) Measurements(database string) ([]string, error)
Measurements return the measurement list on a specify database
func (*InfluxdbClient) Query ¶
func (client *InfluxdbClient) Query(sql, database, precision string) ([]influxmodels.Row, error)
Query execute the given sql query on influxdb
func (*InfluxdbClient) Request ¶
func (client *InfluxdbClient) Request(sql, database, precision string) (*influxdb.Response, error)
Request execute a query on influxdb, and return the raw response
func (*InfluxdbClient) Tags ¶
func (client *InfluxdbClient) Tags(database string, measurements []string) (map[string][]string, error)
Tags get all tag keys from influxdb for group-artifact
func (*InfluxdbClient) WaitExit ¶
func (client *InfluxdbClient) WaitExit()
WaitExit block until all the processer exit
Click to show internal directories.
Click to hide internal directories.