influx

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PluginInfluxdbV2 = "influxdb"

	MeasurementBinary       = "binary_data"
	MeasurementGaugeInteger = "gauge_int_data"
	MeasurementGaugeFloat   = "gauge_float_data"
	MeasurementCounter      = "counter_data"
	MeasurementString       = "string_data"
	MeasurementGeo          = "geo_data"

	QueryClientV1 = "v1"
	QueryClientV2 = "v2"

	DefaultMeasurementPrefix = "mc"
)

global constants

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, config cmap.CustomMap) (metricTY.Plugin, error)

client of influxdb

Types

type Client

type Client struct {
	Client influxdb2.Client

	Config Config
	// contains filtered or unexported fields
}

Client of the influxdb

func (*Client) Close

func (c *Client) Close() error

Close the influxdb connection

func (*Client) Name

func (c *Client) Name() string

func (*Client) Ping

func (c *Client) Ping() error

Ping to target database

func (*Client) Query

func (c *Client) Query(queryConfig *metricTY.QueryConfig) (map[string][]metricTY.ResponseData, error)

Query func implementation

func (*Client) Write

func (c *Client) Write(data *metricTY.InputData) error

func (*Client) WriteBlocking

func (c *Client) WriteBlocking(data *metricTY.InputData) error

WriteBlocking implementation

type Config

type Config struct {
	IsCloudInstance    bool   `yaml:"is_cloud_instance"`
	OrganizationName   string `yaml:"organization_name"`
	BucketName         string `yaml:"bucket_name"`
	MeasurementPrefix  string `yaml:"measurement_prefix"`
	URI                string `yaml:"uri"`
	Token              string `yaml:"token"`
	Username           string `yaml:"username"`
	Password           string `yaml:"password"`
	Insecure           bool   `yaml:"insecure"`
	QueryClientVersion string `yaml:"query_client_version"`
	FlushInterval      string `yaml:"flush_interval"`
	ConnectTimeout     string `yaml:"connect_timeout"`
}

Config of the influxdb_v2

type LoggerConfig

type LoggerConfig struct {
	Mode             string `yaml:"mode"`
	Encoding         string `yaml:"encoding"`
	Level            string `yaml:"level"`
	EnableStacktrace bool   `yaml:"enable_stacktrace"`
}

LoggerConfig struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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