remote

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2016 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package remote is a generated protocol buffer package.

It is generated from these files:

remote.proto

It has these top-level messages:

Sample
LabelPair
TimeSeries
WriteRequest

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v1.1.0

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

Client allows sending batches of Prometheus samples to an HTTP endpoint.

func NewClient added in v1.1.0

func NewClient(conf config.RemoteWriteConfig) (*Client, error)

NewClient creates a new Client.

func (Client) Name added in v1.1.0

func (c Client) Name() string

Name identifies the client as a generic client.

func (*Client) Store added in v1.1.0

func (c *Client) Store(samples model.Samples) error

Store sends a batch of samples to the HTTP endpoint.

type LabelPair added in v1.1.0

type LabelPair struct {
	Name  string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}

func (*LabelPair) Descriptor added in v1.1.0

func (*LabelPair) Descriptor() ([]byte, []int)

func (*LabelPair) ProtoMessage added in v1.1.0

func (*LabelPair) ProtoMessage()

func (*LabelPair) Reset added in v1.1.0

func (m *LabelPair) Reset()

func (*LabelPair) String added in v1.1.0

func (m *LabelPair) String() string

type Options

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 ReloadableStorage added in v1.2.0

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

Storage collects multiple remote storage queues.

func NewConfigurable added in v1.2.0

func NewConfigurable() *ReloadableStorage

New returns a new remote Storage.

func (*ReloadableStorage) Append added in v1.2.0

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

Append implements storage.SampleAppender. Always returns nil.

func (*ReloadableStorage) ApplyConfig added in v1.2.0

func (s *ReloadableStorage) ApplyConfig(conf *config.Config) error

ApplyConfig updates the state as the new config requires.

func (*ReloadableStorage) NeedsThrottling added in v1.2.0

func (s *ReloadableStorage) 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 (*ReloadableStorage) Stop added in v1.2.0

func (s *ReloadableStorage) Stop()

Stop the background processing of the storage queues.

type Sample added in v1.1.0

type Sample struct {
	Value       float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
	TimestampMs int64   `protobuf:"varint,2,opt,name=timestamp_ms,json=timestampMs" json:"timestamp_ms,omitempty"`
}

func (*Sample) Descriptor added in v1.1.0

func (*Sample) Descriptor() ([]byte, []int)

func (*Sample) ProtoMessage added in v1.1.0

func (*Sample) ProtoMessage()

func (*Sample) Reset added in v1.1.0

func (m *Sample) Reset()

func (*Sample) String added in v1.1.0

func (m *Sample) String() string

type Storage

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

Storage collects multiple remote storage queues.

func New

func New(o *Options) (*Storage, error)

New returns a new remote Storage.

func (*Storage) Append

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) error

ApplyConfig updates the status state as the new config requires.

func (*Storage) NeedsThrottling

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) Start added in v1.2.0

func (s *Storage) Start()

Start starts the background processing of the storage queues.

func (*Storage) Stop

func (s *Storage) Stop()

Stop the background processing of the storage queues.

type StorageClient

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

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, cfg *StorageQueueManagerConfig) *StorageQueueManager

NewStorageQueueManager builds a new StorageQueueManager.

func (*StorageQueueManager) Append

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) NeedsThrottling added in v1.1.0

func (*StorageQueueManager) 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 (*StorageQueueManager) Start added in v1.2.0

func (t *StorageQueueManager) Start()

Start the queue manager sending samples to the remote storage. Does not block.

func (*StorageQueueManager) Stop

func (t *StorageQueueManager) Stop()

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

type StorageQueueManagerConfig added in v1.1.0

type StorageQueueManagerConfig struct {
	QueueCapacity     int           // Number of samples to buffer per shard before we start dropping them.
	Shards            int           // Number of shards, i.e. amount of concurrency.
	MaxSamplesPerSend int           // Maximum number of samples per send.
	BatchSendDeadline time.Duration // Maximum time sample will wait in buffer.
}

type TimeSeries added in v1.1.0

type TimeSeries struct {
	Labels []*LabelPair `protobuf:"bytes,1,rep,name=labels" json:"labels,omitempty"`
	// Sorted by time, oldest sample first.
	Samples []*Sample `protobuf:"bytes,2,rep,name=samples" json:"samples,omitempty"`
}

func (*TimeSeries) Descriptor added in v1.1.0

func (*TimeSeries) Descriptor() ([]byte, []int)

func (*TimeSeries) GetLabels added in v1.1.0

func (m *TimeSeries) GetLabels() []*LabelPair

func (*TimeSeries) GetSamples added in v1.1.0

func (m *TimeSeries) GetSamples() []*Sample

func (*TimeSeries) ProtoMessage added in v1.1.0

func (*TimeSeries) ProtoMessage()

func (*TimeSeries) Reset added in v1.1.0

func (m *TimeSeries) Reset()

func (*TimeSeries) String added in v1.1.0

func (m *TimeSeries) String() string

type WriteRequest added in v1.1.0

type WriteRequest struct {
	Timeseries []*TimeSeries `protobuf:"bytes,1,rep,name=timeseries" json:"timeseries,omitempty"`
}

func (*WriteRequest) Descriptor added in v1.1.0

func (*WriteRequest) Descriptor() ([]byte, []int)

func (*WriteRequest) GetTimeseries added in v1.1.0

func (m *WriteRequest) GetTimeseries() []*TimeSeries

func (*WriteRequest) ProtoMessage added in v1.1.0

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) Reset added in v1.1.0

func (m *WriteRequest) Reset()

func (*WriteRequest) String added in v1.1.0

func (m *WriteRequest) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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