db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectSqlite

func ConnectSqlite(file string, debug bool) (*bun.DB, error)

Types

type InfluxDB

type InfluxDB struct {
	influxdb2.Client
	// contains filtered or unexported fields
}

func ConnectInfluxDB

func ConnectInfluxDB(url, org, bucket, token string) (*InfluxDB, error)

func (*InfluxDB) Bucket

func (i *InfluxDB) Bucket() string

func (*InfluxDB) QueryAPI

func (i *InfluxDB) QueryAPI() api.QueryAPI

func (*InfluxDB) WriteAPI

func (i *InfluxDB) WriteAPI() api.WriteAPI

func (*InfluxDB) WriteAPIBlocking

func (i *InfluxDB) WriteAPIBlocking() api.WriteAPIBlocking

func (*InfluxDB) Writer

func (i *InfluxDB) Writer(batchSize int) *Writer

type Writer

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

func (*Writer) CurrentBatch

func (w *Writer) CurrentBatch() []*write.Point

func (*Writer) Flush

func (w *Writer) Flush(ctx context.Context) error

func (*Writer) Write

func (w *Writer) Write(ctx context.Context, p *write.Point) error

Jump to

Keyboard shortcuts

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