influxdb

package
v7.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 5 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(client influx.Client, cmd string) (err error)

Create takes an influx.Client, and a create cmd in order to create objects in the influx db (it doesn't require a db argument like QueryDB)

func QueryDB

func QueryDB(client influx.Client, cmd, db string) (res []influx.Result, err error)

QueryDB takes an influx client interface, cmd, and db strings. It tries to execute the query on the given client, and returns a slice of influx.Result, and an error, if any were present

Types

type Config

type Config struct {
	User     string
	Password string
	URL      string
	// contains filtered or unexported fields
}

Config holds the requisite information to connect to an influx db instance prefix is an optional variable that is set via the Flags method, so as to distinguish between flags for different influxdb instances

func (*Config) Flags

func (c *Config) Flags(prefix string)

Flags configures the cli flags for the config. If more than one config is present for a program, it should be differentiated by a different prefix, so that the flag names don't collide

func (*Config) NewHTTPClient

func (c *Config) NewHTTPClient() (influx.Client, error)

NewHTTPClient tries to use the given configuration to

Jump to

Keyboard shortcuts

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