Documentation
¶
Index ¶
- func BuildFluxQLQueryFilter(tagNames, tagValues, fields []string) string
- func NewBuildFluxQLQueryFilter(tags map[string]string, fields map[string]interface{}) string
- type InfluxdbClient
- func (c *InfluxdbClient) AddPoint(measurement string, tags map[string]string, fields map[string]interface{}) error
- func (c *InfluxdbClient) AddRecord(measurement string, tagName, tagValues []string, fields []interface{}) error
- func (c *InfluxdbClient) Close()
- func (c *InfluxdbClient) CountRecordWithFluxQL(measurement, filter string, start, end time.Time) int64
- func (c *InfluxdbClient) DeletePoint(measurement string, tagKeys, tagValues []string, start, end time.Time) error
- func (c *InfluxdbClient) QueryWithFluxQL(measurement, filter string, start, end time.Time) (*api.QueryTableResult, error)
- func (c *InfluxdbClient) UnsupportedQueryPointWithSQL() error
- type SIMG
- type SensorSIMG
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFluxQLQueryFilter ¶
BuildFluxQLQueryFilter you'd best set single tag to avoid table changed, or fields mismatch with certain struct for following query cmd
Types ¶
type InfluxdbClient ¶
type InfluxdbClient struct {
// contains filtered or unexported fields
}
func GetInfluxdbClient ¶
func GetInfluxdbClient() *InfluxdbClient
func InitInfluxDB ¶
func InitInfluxDB(addr, username, password, org, bucket string) (*InfluxdbClient, error)
func (*InfluxdbClient) AddRecord ¶
func (c *InfluxdbClient) AddRecord(measurement string, tagName, tagValues []string, fields []interface{}) error
func (*InfluxdbClient) Close ¶
func (c *InfluxdbClient) Close()
func (*InfluxdbClient) CountRecordWithFluxQL ¶
func (c *InfluxdbClient) CountRecordWithFluxQL(measurement, filter string, start, end time.Time) int64
func (*InfluxdbClient) DeletePoint ¶
func (*InfluxdbClient) QueryWithFluxQL ¶
func (c *InfluxdbClient) QueryWithFluxQL(measurement, filter string, start, end time.Time) (*api.QueryTableResult, error)
func (*InfluxdbClient) UnsupportedQueryPointWithSQL ¶
func (c *InfluxdbClient) UnsupportedQueryPointWithSQL() error
type SensorSIMG ¶
type SensorSIMG []SIMG
func (SensorSIMG) ParseSensorData ¶
func (s SensorSIMG) ParseSensorData(result *api.QueryTableResult) ([]SIMG, error)
Click to show internal directories.
Click to hide internal directories.