influx

package
v0.0.0-...-2d872d1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Token  string `envconfig:"INFLUX_TOKEN" required:"true"`
	URL    string `envconfig:"INFLUX_URL" required:"true"`
	Org    string `envconfig:"INFLUX_ORG" required:"true"`
	Bucket string `envconfig:"INFLUX_BUCKET" required:"true"`
}

type InfluxClient

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

func NewClient

func NewClient(cfg Config) InfluxClient

func (InfluxClient) Write

func (c InfluxClient) Write(ctx context.Context, measurement Measurement) error

type Measurement

type Measurement struct {
	Name      string
	Type      string
	Value     float64
	Timestamp time.Time
	Tags      map[string]string
}

Jump to

Keyboard shortcuts

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