remote

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options added in v1.0.0

type Options struct {
	StorageTimeout          time.Duration
	InfluxdbURL             *url.URL
	InfluxdbRetentionPolicy string
	InfluxdbUsername        string
	InfluxdbPassword        string
	InfluxdbDatabase        string
	OpentsdbURL             string
	GraphiteAddress         string
	GraphiteTransport       string
	GraphitePrefix          string
}

Options contains configuration parameters for a remote storage.

type Storage

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

Storage collects multiple remote storage queues.

func New added in v1.0.0

func New(o *Options) *Storage

New returns a new remote Storage.

func (*Storage) Append added in v1.0.0

func (s *Storage) Append(smpl *model.Sample) error

Append implements storage.SampleAppender. Always returns nil.

func (*Storage) ApplyConfig

func (s *Storage) ApplyConfig(conf *config.Config) bool

ApplyConfig updates the status state as the new config requires. Returns true on success.

func (*Storage) Collect added in v1.0.0

func (s *Storage) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector.

func (*Storage) Describe added in v1.0.0

func (s *Storage) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector.

func (*Storage) NeedsThrottling added in v1.0.0

func (s *Storage) NeedsThrottling() bool

NeedsThrottling implements storage.SampleAppender. It will always return false as a remote storage drops samples on the floor if backlogging instead of asking for throttling.

func (*Storage) Run added in v1.0.0

func (s *Storage) Run()

Run starts the background processing of the storage queues.

func (*Storage) Stop added in v1.0.0

func (s *Storage) Stop()

Stop the background processing of the storage queues.

type StorageClient added in v1.0.0

type StorageClient interface {
	// Store stores the given samples in the remote storage.
	Store(model.Samples) error
	// Name identifies the remote storage implementation.
	Name() string
}

StorageClient defines an interface for sending a batch of samples to an external timeseries database.

type StorageQueueManager added in v1.0.0

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

StorageQueueManager manages a queue of samples to be sent to the Storage indicated by the provided StorageClient.

func NewStorageQueueManager added in v1.0.0

func NewStorageQueueManager(tsdb StorageClient, queueCapacity int) *StorageQueueManager

NewStorageQueueManager builds a new StorageQueueManager.

func (*StorageQueueManager) Append added in v1.0.0

func (t *StorageQueueManager) Append(s *model.Sample) error

Append queues a sample to be sent to the remote storage. It drops the sample on the floor if the queue is full. Always returns nil.

func (*StorageQueueManager) Collect added in v1.0.0

func (t *StorageQueueManager) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector.

func (*StorageQueueManager) Describe added in v1.0.0

func (t *StorageQueueManager) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector.

func (*StorageQueueManager) Run added in v1.0.0

func (t *StorageQueueManager) Run()

Run continuously sends samples to the remote storage.

func (*StorageQueueManager) Stop added in v1.0.0

func (t *StorageQueueManager) Stop()

Stop stops sending samples to the remote storage and waits for pending sends to complete.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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