influxdb

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2018 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeBatchConfig added in v0.18.0

func MakeBatchConfig(conf Config) client.BatchPointsConfig

func MakeClient added in v0.18.0

func MakeClient(conf Config) (client.Client, error)

Types

type Collector

type Collector struct {
	Client    client.Client
	Config    Config
	BatchConf client.BatchPointsConfig
	// contains filtered or unexported fields
}

func New

func New(conf Config) (*Collector, error)

func (*Collector) Collect

func (c *Collector) Collect(samples []stats.Sample)

func (*Collector) Init added in v0.12.2

func (c *Collector) Init() error
func (c *Collector) Link() string

func (*Collector) Run

func (c *Collector) Run(ctx context.Context)

type Config added in v0.16.0

type Config ConfigFields

func (Config) Apply added in v0.18.0

func (c Config) Apply(cfg Config) Config

func (Config) MarshalJSON added in v0.18.0

func (c Config) MarshalJSON() ([]byte, error)

func (*Config) UnmarshalJSON added in v0.18.0

func (c *Config) UnmarshalJSON(data []byte) error

func (*Config) UnmarshalText added in v0.18.0

func (c *Config) UnmarshalText(text []byte) error

type ConfigFields added in v0.18.0

type ConfigFields struct {
	// Connection.
	Addr        string `json:"addr" envconfig:"INFLUXDB_ADDR"`
	Username    string `json:"username,omitempty" envconfig:"INFLUXDB_USERNAME"`
	Password    string `json:"password,omitempty" envconfig:"INFLUXDB_PASSWORD"`
	Insecure    bool   `json:"insecure,omitempty" envconfig:"INFLUXDB_INSECURE"`
	PayloadSize int    `json:"payload_size,omitempty" envconfig:"INFLUXDB_PAYLOAD_SIZE"`

	// Samples.
	DB          string `json:"db" envconfig:"INFLUXDB_DB"`
	Precision   string `json:"precision,omitempty" envconfig:"INFLUXDB_PRECISION"`
	Retention   string `json:"retention,omitempty" envconfig:"INFLUXDB_RETENTION"`
	Consistency string `json:"consistency,omitempty" envconfig:"INFLUXDB_CONSISTENCY"`
}

Jump to

Keyboard shortcuts

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