Documentation ¶
Index ¶
- Constants
- func OpenTsStore(storagePath string) (*tsdb.Store, error)
- type Adapter
- type Appender
- func (a *Appender) Append(ref storage.SeriesRef, l labels.Labels, time int64, value float64) (storage.SeriesRef, error)
- func (a *Appender) AppendExemplar(ref storage.SeriesRef, l labels.Labels, e exemplar.Exemplar) (storage.SeriesRef, error)
- func (a *Appender) AppendHistogram(ref storage.SeriesRef, l labels.Labels, t int64, h *histogram.Histogram, ...) (storage.SeriesRef, error)
- func (a *Appender) Commit() error
- func (a *Appender) Rollback() error
- func (a *Appender) UpdateMetadata(ref storage.SeriesRef, l labels.Labels, m metadata.Metadata) (storage.SeriesRef, error)
- type AppenderOption
- type InfluxAdapter
- func (t *InfluxAdapter) AllMeasurementNames() []string
- func (t *InfluxAdapter) AllTagKeys(ctx context.Context) []string
- func (t *InfluxAdapter) AllTagValues(ctx context.Context, 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(matchers ...*labels.Matcher) ([]string, storage.Warnings, error)
- func (q *Querier) LabelValues(name string, matchers ...*labels.Matcher) ([]string, storage.Warnings, error)
- func (q *Querier) Select(sortSeries bool, params *storage.SelectHints, labelMatchers ...*labels.Matcher) storage.SeriesSet
- type RetentionConfig
- type ShardIDs
- type Store
- func (store *Store) Appender(ctx context.Context) storage.Appender
- func (store *Store) ChunkQuerier(ctx context.Context, mint, maxt int64) (storage.ChunkQuerier, error)
- func (s *Store) Close() error
- func (store *Store) Compact()
- func (store *Store) Querier(ctx context.Context, mint, maxt int64) (storage.Querier, error)
- func (s *Store) StartTime() (int64, error)
- 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 metrics.Registrar, opts ...AppenderOption) *Appender
func (*Appender) AppendExemplar ¶ added in v1.6.0
func (*Appender) AppendHistogram ¶ added in v1.6.0
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 metrics.Registrar, log *logger.Logger) *InfluxAdapter
func (*InfluxAdapter) AllMeasurementNames ¶
func (t *InfluxAdapter) AllMeasurementNames() []string
func (*InfluxAdapter) AllTagKeys ¶
func (t *InfluxAdapter) AllTagKeys(ctx context.Context) []string
func (*InfluxAdapter) AllTagValues ¶
func (t *InfluxAdapter) AllTagValues(ctx context.Context, 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(ctx context.Context, auth query.FineAuthorizer, shardIDs []uint64, cond influxql.Expr) ([]tsdb.TagKeys, error) TagValues(ctx context.Context, auth query.FineAuthorizer, 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 (*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 metrics.Registrar, opts ...StoreOption) *Store
func (*Store) ChunkQuerier ¶ added in v1.6.0
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.