influx

package
v0.0.0-...-fe13f99 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package influx enables writing metric values to influxdb.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromFile

func FromFile(filename string) (result pstore.LimitedRecordWriter, err error)

FromFile creates a new writer from a configuration file.

Types

type Config

type Config struct {
	// The influxdb endpoint. Required.
	HostAndPort string `yaml:"hostAndPort"`
	// The user name. Optional.
	UserName string `yaml:"username"`
	// The password. Optional.
	Password string `yaml:"password"`
	// The database name. Required.
	Database string `yaml:"database"`
	// The precision. Optional. Defaults to "ns"
	Precision string `yaml:"precision"`
	// The retention policy to use when writing. Optional.
	RetentionPolicy string `yaml:"retentionPolicy"`
	// The write consistency. Optional. "any", "one", "quorum", or "all"
	WriteConsistency string `yaml:"writeConsistency"`
}

Config represents the configuration of influx db. Config implements yamlutil.Config

func (*Config) NewWriter

func (c *Config) NewWriter() (pstore.LimitedRecordWriter, error)

func (*Config) Reset

func (c *Config) Reset()

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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