influxdb

package
v0.0.0-...-8c930d8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client() (influxdb2.Client, error)

Client returns the initialized InfluxDB client.

func New

func New(cfg config.Influxdb) (influxdb2.Client, error)

New returns a new InfluxDB client instance with given configuration. It's the caller's responsibility to close the client, caller should always call client.Close() when it's no longer needed.

func Query

func Query(ctx context.Context, query string) (*api.QueryTableResult, error)

Query executes a Flux query against InfluxDB

func QueryAPI

func QueryAPI() (api.QueryAPI, error)

QueryAPI returns the query API of the initialized InfluxDB client.

func WriteAPI

func WriteAPI() (api.WriteAPIBlocking, error)

WriteAPI returns the write API of the initialized InfluxDB client.

func WritePoint

func WritePoint(ctx context.Context, measurement string, tags map[string]string, fields map[string]any, ts ...time.Time) error

WritePoint writes a single point to InfluxDB

Types

This section is empty.

Jump to

Keyboard shortcuts

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