influxdbstore

package
v0.0.0-...-93220a3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2016 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminUser

type AdminUser struct {
	Username string
	Password string
}

type Config

type Config struct {
	AdminUser AdminUser
	BuildInfo *influxDBServer.BuildInfo
	DefaultRP RetentionPolicy
	Mode      mode
	Server    *influxDBServer.Config

	// LogOutput, if specified, controls where all InfluxDB logs are written to.
	LogOutput io.Writer

	// MaxBatchSizeBytes specifies the maximum size (estimated memory usage) in
	// bytes that a batch may grow to become before being entirely dropped (and
	// inherently, trace data lost). This prevents any potential memory leak in
	// the case of an unresponsive or too slow InfluxDB server / pending flush
	// operation.
	//
	// The default value used by NewConfig is 128*1024*1024 (128 MB).
	MaxBatchSizeBytes int

	// BatchFlushInterval specifies the minimum interval between flush calls by
	// the background goroutine in order to flush point batches out to
	// InfluxDB. That is, after each batch flush the goroutine will sleep for
	// this amount of time to prevent CPU overutilization.
	//
	// The default value used by NewConfig is 500 * time.Millisecond.
	BatchFlushInterval time.Duration
}

func NewConfig

func NewConfig() (*Config, error)

NewConfig returns a new Config with the default values.

type RetentionPolicy

type RetentionPolicy struct {
	Name     string // Name used to indentify this retention policy.
	Duration string // How long InfluxDB keeps the data. Eg: "1h", "1d", "1w".
}

type Store

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

func New

func New(config *Config) (*Store, error)

New returns a new InfluxDB-backed store. It starts an in-process / embedded InfluxDB server.

func (*Store) Aggregate

func (in *Store) Aggregate(start, end time.Duration) ([]*appdash.AggregatedResult, error)

Aggregate implements the Aggregator interface.

func (*Store) Close

func (in *Store) Close() error

Close flushes the last batch to InfluxDB and shuts down the Store.

func (*Store) Collect

func (in *Store) Collect(id appdash.SpanID, anns ...appdash.Annotation) error

func (*Store) Trace

func (in *Store) Trace(id appdash.ID) (*appdash.Trace, error)

func (*Store) Traces

func (in *Store) Traces(opts appdash.TracesOpts) ([]*appdash.Trace, error)

Jump to

Keyboard shortcuts

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