persistence

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenTsStore

func OpenTsStore(storagePath string) (*tsdb.Store, error)

Types

type InfluxAdapter

type InfluxAdapter struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewInfluxAdapter

func NewInfluxAdapter(influx InfluxStore, m MetricsInitializer) *InfluxAdapter

func (*InfluxAdapter) AllMeasurementNames

func (t *InfluxAdapter) AllMeasurementNames() []string

func (*InfluxAdapter) AllTagKeys

func (t *InfluxAdapter) AllTagKeys() []string

func (*InfluxAdapter) AllTagValues

func (t *InfluxAdapter) AllTagValues(tagKey string) []string

func (*InfluxAdapter) Close

func (t *InfluxAdapter) Close()

func (*InfluxAdapter) Delete

func (t *InfluxAdapter) Delete(shardId uint64)

func (*InfluxAdapter) DeleteOlderThan

func (t *InfluxAdapter) DeleteOlderThan(cutoff int64) (numDeleted uint64, err error)

func (*InfluxAdapter) DeleteOldest

func (t *InfluxAdapter) DeleteOldest() error

func (*InfluxAdapter) GetPoints

func (t *InfluxAdapter) GetPoints(measurementName string, start, end int64, matchers []*labels.Matcher) (*transform.SeriesSetBuilder, error)

func (*InfluxAdapter) ShardIDs

func (t *InfluxAdapter) ShardIDs() []uint64

func (*InfluxAdapter) WritePoints

func (t *InfluxAdapter) WritePoints(points []*rpc.Point) error

type InfluxStore

type InfluxStore interface {
	ShardIDs() []uint64
	WriteToShard(shardId uint64, points []models.Point) error
	CreateShard(database string, retentionPolicy string, shardId uint64, enabled bool) error
	ShardGroup(shardIds []uint64) tsdb.ShardGroup
	DeleteShard(shardId uint64) error
	TagKeys(auth query.Authorizer, shardIDs []uint64, cond influxql.Expr) ([]tsdb.TagKeys, error)
	TagValues(auth query.Authorizer, shardIDs []uint64, cond influxql.Expr) ([]tsdb.TagValues, error)
	Close() error
}

type Metrics

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

type MetricsInitializer

type MetricsInitializer interface {
	NewCounter(name string) func(delta uint64)
	NewGauge(name, unit string) func(value float64)
}

type Store

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

func NewStore

func NewStore(influxStore InfluxStore, m MetricsInitializer, opts ...WithStoreOption) *Store

func (*Store) Close

func (store *Store) Close()

func (*Store) DeleteOlderThan

func (store *Store) DeleteOlderThan(cutoff time.Time)

func (*Store) DeleteOldest

func (store *Store) DeleteOldest()

func (*Store) Get

func (store *Store) Get(params *storage.SelectParams, labelMatchers ...*labels.Matcher) (storage.SeriesSet, error)

func (*Store) LabelValues

func (*Store) Labels

func (store *Store) Labels() (*rpc.PromQL_LabelsQueryResult, error)

func (*Store) Put

func (store *Store) Put(points []*rpc.Point)

type WithStoreOption

type WithStoreOption func(*Store)

func WithLabelTruncationLength

func WithLabelTruncationLength(length uint) WithStoreOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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