influxdb

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Maximum time to try and connect to InfluxDB during startup.
	DefaultStartUpTimeout = time.Minute * 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled               bool                `toml:"enabled"`
	URLs                  []string            `toml:"urls"`
	Username              string              `toml:"username"`
	Password              string              `toml:"password"`
	Timeout               toml.Duration       `toml:"timeout"`
	Subscriptions         map[string][]string `toml:"subscriptions"`
	ExcludedSubscriptions map[string][]string `toml:"excluded-subscriptions"`
	UDPBuffer             int                 `toml:"udp-buffer"`
	UDPReadBuffer         int                 `toml:"udp-read-buffer"`
	StartUpTimeout        toml.Duration       `toml:"startup-timeout"`
}

func NewConfig

func NewConfig() Config

func (Config) Validate

func (c Config) Validate() error

type Service

type Service struct {
	PointsWriter interface {
		WritePoints(p *cluster.WritePointsRequest) error
	}
	LogService interface {
		NewLogger(string, int) *log.Logger
	}
	// contains filtered or unexported fields
}

Handles requests to write or read from an InfluxDB cluster

func NewService

func NewService(c Config, hostname string, l *log.Logger) *Service

func (*Service) Addr

func (s *Service) Addr() string

func (*Service) Close

func (s *Service) Close() error

func (*Service) NewClient

func (s *Service) NewClient() (c *client.Client, err error)

func (*Service) Open

func (s *Service) Open() error

Jump to

Keyboard shortcuts

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