remote

package
v0.0.0-...-95bd64c Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StorageClient

type StorageClient interface {
	// Store stores the given samples in the remote storage.
	Store(clientmodel.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

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

func NewStorageQueueManager(tsdb StorageClient, queueCapacity int) *StorageQueueManager

NewStorageQueueManager builds a new StorageQueueManager.

func (*StorageQueueManager) Append

func (t *StorageQueueManager) Append(s *clientmodel.Sample)

Append queues a sample to be sent to the remote storage. It drops the sample on the floor if the queue is full. It implements storage.SampleAppender.

func (*StorageQueueManager) Collect

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

Collect implements prometheus.Collector.

func (*StorageQueueManager) Describe

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

Describe implements prometheus.Collector.

func (*StorageQueueManager) Run

func (t *StorageQueueManager) Run()

Run continuously sends samples to the remote storage.

func (*StorageQueueManager) Stop

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