Versions in this module Expand all Collapse all v1 v1.8.2 Nov 4, 2017 Changes in this version + const Version + var ErrDuplicateSampleForTimestamp = fmt.Errorf("sample with repeated timestamp but different value") + var ErrOutOfOrderSample = fmt.Errorf("sample timestamp out of order") + func DumpHeads(filename string, out io.Writer) error + type MemorySeriesStorage struct + func NewMemorySeriesStorage(o *MemorySeriesStorageOptions) *MemorySeriesStorage + func NewTestStorage(t testutil.T, encoding chunk.Encoding) (*MemorySeriesStorage, testutil.Closer) + func (s *MemorySeriesStorage) Append(sample *model.Sample) error + func (s *MemorySeriesStorage) Collect(ch chan<- prometheus.Metric) + func (s *MemorySeriesStorage) Describe(ch chan<- *prometheus.Desc) + func (s *MemorySeriesStorage) DropMetricsForLabelMatchers(_ context.Context, matchers ...*metric.LabelMatcher) (int, error) + func (s *MemorySeriesStorage) LabelValuesForLabelName(_ context.Context, labelName model.LabelName) (model.LabelValues, error) + func (s *MemorySeriesStorage) LastSampleForLabelMatchers(_ context.Context, cutoff model.Time, matcherSets ...metric.LabelMatchers) (model.Vector, error) + func (s *MemorySeriesStorage) MetricsForLabelMatchers(_ context.Context, from, through model.Time, ...) ([]metric.Metric, error) + func (s *MemorySeriesStorage) NeedsThrottling() bool + func (s *MemorySeriesStorage) Querier() (Querier, error) + func (s *MemorySeriesStorage) QueryInstant(ctx context.Context, ts model.Time, stalenessDelta time.Duration, ...) ([]SeriesIterator, error) + func (s *MemorySeriesStorage) QueryRange(ctx context.Context, from, through model.Time, ...) ([]SeriesIterator, error) + func (s *MemorySeriesStorage) Start() (err error) + func (s *MemorySeriesStorage) Stop() error + func (s *MemorySeriesStorage) WaitForIndexing() + type MemorySeriesStorageOptions struct + CheckpointDirtySeriesLimit int + CheckpointInterval time.Duration + Dirty bool + HeadChunkTimeout time.Duration + MinShrinkRatio float64 + NumMutexes int + PedanticChecks bool + PersistenceRetentionPeriod time.Duration + PersistenceStoragePath string + SyncStrategy SyncStrategy + TargetHeapSize uint64 + type NoopQuerier struct + func (s *NoopQuerier) Close() error + func (s *NoopQuerier) LabelValuesForLabelName(ctx context.Context, labelName model.LabelName) (model.LabelValues, error) + func (s *NoopQuerier) LastSampleForLabelMatchers(ctx context.Context, cutoff model.Time, matcherSets ...metric.LabelMatchers) (model.Vector, error) + func (s *NoopQuerier) MetricsForLabelMatchers(ctx context.Context, from, through model.Time, ...) ([]metric.Metric, error) + func (s *NoopQuerier) QueryInstant(ctx context.Context, ts model.Time, stalenessDelta time.Duration, ...) ([]SeriesIterator, error) + func (s *NoopQuerier) QueryRange(ctx context.Context, from, through model.Time, ...) ([]SeriesIterator, error) + type NoopStorage struct + func (s *NoopStorage) Append(sample *model.Sample) error + func (s *NoopStorage) DropMetricsForLabelMatchers(ctx context.Context, matchers ...*metric.LabelMatcher) (int, error) + func (s *NoopStorage) NeedsThrottling() bool + func (s *NoopStorage) Querier() (Querier, error) + func (s *NoopStorage) Start() (err error) + func (s *NoopStorage) Stop() error + func (s *NoopStorage) WaitForIndexing() + type Querier interface + Close func() error + LabelValuesForLabelName func(context.Context, model.LabelName) (model.LabelValues, error) + LastSampleForLabelMatchers func(ctx context.Context, cutoff model.Time, matcherSets ...metric.LabelMatchers) (model.Vector, error) + MetricsForLabelMatchers func(ctx context.Context, from, through model.Time, ...) ([]metric.Metric, error) + QueryInstant func(ctx context.Context, ts model.Time, stalenessDelta time.Duration, ...) ([]SeriesIterator, error) + QueryRange func(ctx context.Context, from, through model.Time, ...) ([]SeriesIterator, error) + type SeriesIterator interface + Close func() + Metric func() metric.Metric + RangeValues func(metric.Interval) []model.SamplePair + ValueAtOrBeforeTime func(model.Time) model.SamplePair + type Storage interface + DropMetricsForLabelMatchers func(context.Context, ...*metric.LabelMatcher) (int, error) + Querier func() (Querier, error) + Start func() error + Stop func() error + WaitForIndexing func() + type SyncStrategy int + const Adaptive + const Always + const Never + func (ss *SyncStrategy) Set(s string) error + func (ss SyncStrategy) String() string