Documentation ¶
Index ¶
- Constants
- func OpenTsStore(storagePath string) (*tsdb.Store, error)
- type Adapter
- type Appender
- type AppenderOption
- type InfluxAdapter
- func (t *InfluxAdapter) AllMeasurementNames() []string
- func (t *InfluxAdapter) AllTagKeys() []string
- func (t *InfluxAdapter) AllTagValues(tagKey string) []string
- func (t *InfluxAdapter) Close() error
- func (t *InfluxAdapter) Delete(shardID uint64) error
- func (t *InfluxAdapter) DeleteOlderThan(cutoff int64) (uint64, error)
- func (t *InfluxAdapter) DeleteOldest() error
- func (t *InfluxAdapter) GetPoints(ctx context.Context, measurementName string, start, end int64, ...) (*transform.SeriesSetBuilder, error)
- func (t *InfluxAdapter) OldestContiguousShardID() (uint64, error)
- func (t *InfluxAdapter) OldestShardID() (uint64, error)
- func (t *InfluxAdapter) ShardIDs() []uint64
- func (t *InfluxAdapter) ShardIDsOldestSort() []uint64
- func (t *InfluxAdapter) WritePoints(points []*rpc.Point) error
- type InfluxStore
- type Querier
- func (q *Querier) Close() error
- func (q *Querier) LabelNames() ([]string, storage.Warnings, error)
- func (q *Querier) LabelValues(name string) ([]string, storage.Warnings, error)
- func (q *Querier) Select(params *storage.SelectParams, labelMatchers ...*labels.Matcher) (storage.SeriesSet, storage.Warnings, error)
- type RetentionConfig
- type ShardIDs
- type Store
- type StoreOption
- func WithAppenderLabelTruncationLength(length uint) StoreOption
- func WithDiskFreeReporter(diskFreeReporter func() (float64, error)) StoreOption
- func WithLogger(log *logger.Logger) StoreOption
- func WithMetricsEmitDuration(metricsEmitDuration time.Duration) StoreOption
- func WithRetentionConfig(config RetentionConfig) StoreOption
- type UintSlice
Constants ¶
View Source
const ( UNCONFIGURED_DISK_FREE_PERCENT_TARGET = -1 UNCONFIGURED_RETENTION_PERIOD = -1 UNCONFIGURED_EXPIRY_FREQUENCY = -1 UNCONFIGURED_METRICS_EMIT_DURATION = -1 UNKNOWN_DISK_FREE_PERCENT = 100 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Appender ¶ added in v1.2.1
type Appender struct {
// contains filtered or unexported fields
}
func NewAppender ¶ added in v1.2.1
func NewAppender(adapter Adapter, metrics debug.MetricRegistrar, opts ...AppenderOption) *Appender
type AppenderOption ¶ added in v1.2.1
type AppenderOption func(*Appender)
func WithAppenderLogger ¶ added in v1.2.1
func WithAppenderLogger(log *logger.Logger) AppenderOption
func WithLabelTruncationLength ¶
func WithLabelTruncationLength(length uint) AppenderOption
type InfluxAdapter ¶
type InfluxAdapter struct {
// contains filtered or unexported fields
}
func NewInfluxAdapter ¶
func NewInfluxAdapter(influx InfluxStore, metrics debug.MetricRegistrar, log *logger.Logger) *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() error
func (*InfluxAdapter) Delete ¶
func (t *InfluxAdapter) Delete(shardID uint64) error
func (*InfluxAdapter) DeleteOlderThan ¶
func (t *InfluxAdapter) DeleteOlderThan(cutoff int64) (uint64, error)
func (*InfluxAdapter) DeleteOldest ¶
func (t *InfluxAdapter) DeleteOldest() error
func (*InfluxAdapter) GetPoints ¶
func (t *InfluxAdapter) GetPoints(ctx context.Context, measurementName string, start, end int64, matchers []*labels.Matcher) (*transform.SeriesSetBuilder, error)
func (*InfluxAdapter) OldestContiguousShardID ¶ added in v1.2.1
func (t *InfluxAdapter) OldestContiguousShardID() (uint64, error)
OldestContiguousShardID returns the oldest shardID known to the adapter, that is part of the unbroken series closest to the newest shardID
func (*InfluxAdapter) OldestShardID ¶ added in v1.2.1
func (t *InfluxAdapter) OldestShardID() (uint64, error)
OldestShardID returns the absolute oldest shardID known to the adapter, regardless of potential time gaps between shards
func (*InfluxAdapter) ShardIDs ¶
func (t *InfluxAdapter) ShardIDs() []uint64
ShardIDs returns all shardIDs known to the adapter, sorted newest to oldest
func (*InfluxAdapter) ShardIDsOldestSort ¶ added in v1.2.1
func (t *InfluxAdapter) ShardIDsOldestSort() []uint64
func (*InfluxAdapter) WritePoints ¶
func (t *InfluxAdapter) WritePoints(points []*rpc.Point) error
type InfluxStore ¶
type InfluxStore interface { Close() error CreateShard(database string, retentionPolicy string, shardId uint64, enabled bool) error DeleteShard(shardId uint64) error ShardGroup(shardIds []uint64) tsdb.ShardGroup ShardIDs() []uint64 Shards(ids []uint64) []*tsdb.Shard Statistics(database map[string]string) []models.Statistic TagKeys(auth query.Authorizer, shardIDs []uint64, cond influxql.Expr) ([]tsdb.TagKeys, error) TagValues(auth query.Authorizer, shardIDs []uint64, cond influxql.Expr) ([]tsdb.TagValues, error) WriteToShard(shardId uint64, points []models.Point) error }
type Querier ¶ added in v1.2.1
type Querier struct {
// contains filtered or unexported fields
}
func NewQuerier ¶ added in v1.2.1
func NewQuerier(ctx context.Context, adapter *InfluxAdapter, metrics debug.MetricRegistrar) *Querier
func (*Querier) LabelNames ¶ added in v1.2.1
func (*Querier) LabelValues ¶ added in v1.2.1
type RetentionConfig ¶ added in v1.2.1
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStore ¶
func NewStore(storagePath string, metrics debug.MetricRegistrar, opts ...StoreOption) *Store
type StoreOption ¶ added in v1.2.1
type StoreOption func(*Store)
func WithAppenderLabelTruncationLength ¶ added in v1.2.1
func WithAppenderLabelTruncationLength(length uint) StoreOption
func WithDiskFreeReporter ¶ added in v1.2.1
func WithDiskFreeReporter(diskFreeReporter func() (float64, error)) StoreOption
func WithLogger ¶ added in v1.2.1
func WithLogger(log *logger.Logger) StoreOption
func WithMetricsEmitDuration ¶ added in v1.2.1
func WithMetricsEmitDuration(metricsEmitDuration time.Duration) StoreOption
WithMetricsEmitDuration sets the duration to which periodic metrics are emitted
func WithRetentionConfig ¶ added in v1.2.1
func WithRetentionConfig(config RetentionConfig) StoreOption
WithRetentionConfig sets the frequency of automated cleanup that expires old data.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.