influxdb

package
v0.21.16 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 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 Access

type Access string
const (
	Proxy   Access = "proxy"
	Browser Access = "direct"
)

type InfluxQL

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

func New

func New(name, url string, options ...Option) (InfluxQL, error)

func (InfluxQL) MarshalJSON

func (datasource InfluxQL) MarshalJSON() ([]byte, error)

func (InfluxQL) Name

func (datasource InfluxQL) Name() string

type Option

type Option func(datasource *InfluxQL) error

func AccessMode

func AccessMode(mode Access) Option

AccessMode controls how requests to the data source will be handled. Proxy should be the preferred way if nothing else is stated. Browser will let your browser send the requests (deprecated).

func BasicAuth

func BasicAuth(username string, password string) Option

BasicAuth configures basic authentication for this datasource.

func Database

func Database(database string) Option

Database sets the ID of the bucket you want to query from, copied from the Buckets page of the InfluxDB UI.

func Default

func Default() Option

Default configures this datasource to be the default one.

func ForwardOauthIdentity

func ForwardOauthIdentity() Option

ForwardOauthIdentity forward the user's upstream OAuth identity to the datasource.

func HTTPMethod

func HTTPMethod(method string) Option

HTTPMethod defines the Method used to query the database (GET or POST HTTP verb). The POST verb allows heavy queries that would return an error using the GET verb. Default is GET.

func KeepCookies

func KeepCookies(cookies []string) Option

KeepCookies controls the cookies that will be forwarded to the data source. All other cookies will be deleted.

func MaxSeries

func MaxSeries(max int) Option

MaxSeries limits the number of series/tables that Grafana processes. Lower this number to prevent abuse, and increase it if you have lots of small time series and not all are shown. Defaults to 1000.

func MinTimeInterval

func MinTimeInterval(interval time.Duration) Option

MinTimeInterval defines a lower limit for the auto group by time interval. Recommended to be set to write frequency, for example 1m if your data is written every minute.

func Password

func Password(password string) Option

Password sets token you use to query the selected bucked, copied from the Tokens page of the InfluxDB UI.

func SkipTLSVerify

func SkipTLSVerify() Option

SkipTLSVerify disables verification of SSL certificates.

func TLSClientAuth

func TLSClientAuth(cert string, key string) Option

TLSClientAuth enables TLS client side authentication. Expects PEM encoded content.

func Timeout

func Timeout(timeout time.Duration) Option

Timeout sets the timeout for HTTP requests.

func User

func User(user string) Option

User sets username to use to sign into InfluxDB.

func WithCACert

func WithCACert(cert string) Option

WithCACert allows to provide a PEM encoded CA certificate to trust for this data source.

func WithCredentials

func WithCredentials() Option

WithCredentials joins credentials such as cookies or auth headers to cross-site requests.

Jump to

Keyboard shortcuts

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