tsdb

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 25 Imported by: 27

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTSDB

func CreateTSDB(cfg *config.V3ioConfig, schema *config.Schema, container v3io.Container) error

func NewContainer added in v0.8.5

func NewContainer(v3ioURL string, numWorkers int, accessKey string, username string, password string, containerName string, logger logger.Logger) (v3io.Container, error)

Types

type Appender

type Appender interface {
	Add(l utils.Labels, t int64, v interface{}) (uint64, error)
	AddFast(ref uint64, t int64, v interface{}) error
	WaitForCompletion(timeout time.Duration) (int, error)
	Commit() error
	Rollback() error
	Close()
}

The Appender interface provides batched appends against a storage.

type DeleteParams added in v0.9.17

type DeleteParams struct {
	Metrics   []string
	Filter    string
	From, To  int64
	DeleteAll bool

	IgnoreErrors bool
}

type V3ioAdapter

type V3ioAdapter struct {
	HTTPTimeout  time.Duration
	MetricsCache *appender.MetricsCache
	// contains filtered or unexported fields
}

func NewV3ioAdapter

func NewV3ioAdapter(cfg *config.V3ioConfig, container v3io.Container, logger logger.Logger) (*V3ioAdapter, error)

Create a new TSDB adapter, similar to Prometheus TSDB adapter but with a few extensions. The Prometheus compliant adapter is found under /promtsdb.

func (*V3ioAdapter) Appender

func (a *V3ioAdapter) Appender() (Appender, error)

Create an appender interface, for writing performance

func (*V3ioAdapter) Close

func (a *V3ioAdapter) Close() error

func (*V3ioAdapter) CountMetrics

func (a *V3ioAdapter) CountMetrics(part string) (int, error)

Return the number of items in a TSDB table

func (*V3ioAdapter) DeleteDB

func (a *V3ioAdapter) DeleteDB(deleteParams DeleteParams) error

Delete by time range can optionally specify metrics and filter by labels

func (*V3ioAdapter) DeletePartitionsData added in v0.9.17

func (a *V3ioAdapter) DeletePartitionsData(deleteParams *DeleteParams) error

func (*V3ioAdapter) GetContainer

func (a *V3ioAdapter) GetContainer() (v3io.Container, string)

func (*V3ioAdapter) GetLogger

func (a *V3ioAdapter) GetLogger(child string) logger.Logger

func (*V3ioAdapter) GetSchema added in v0.0.3

func (a *V3ioAdapter) GetSchema() *config.Schema

func (*V3ioAdapter) InitAppenderCache added in v0.0.3

func (a *V3ioAdapter) InitAppenderCache() error

func (*V3ioAdapter) Querier

func (a *V3ioAdapter) Querier(_ context.Context, mint, maxt int64) (*querier.V3ioQuerier, error)

Create a Querier interface, used for time-series queries

func (*V3ioAdapter) QuerierV2 added in v0.8.3

func (a *V3ioAdapter) QuerierV2() (*pquerier.V3ioQuerier, error)

Create a Querier interface, used for time-series queries

func (*V3ioAdapter) StartTime

func (a *V3ioAdapter) StartTime() (int64, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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