influx

package
v0.0.0-...-4f99e4d Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCouldNotQueryInflux       = fmt.Errorf("could not query influx")
	ErrCouldNotParseInfluxResult = fmt.Errorf("could not parse influx result")
	ErrUnknownQueryError         = fmt.Errorf("unknown query error")
	ErrUnknownError              = fmt.Errorf("unknown error")
)

Functions

This section is empty.

Types

type InfluxConn

type InfluxConn struct {
	Conn        influxdb2.Client
	QueryClient api.QueryAPI
}

func InitInflux

func InitInflux(endpoint string, token string) *InfluxConn

func (*InfluxConn) Close

func (ic *InfluxConn) Close()

func (*InfluxConn) GetPM100S

func (ic *InfluxConn) GetPM100S(ctx context.Context) (float64, error)

func (*InfluxConn) GetPM25S

func (ic *InfluxConn) GetPM25S(ctx context.Context) (float64, error)

Jump to

Keyboard shortcuts

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