Versions in this module Expand all Collapse all v2 v2.5.2 Apr 27, 2022 Changes in this version + var ErrIntOverflowCachingIndexClient = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthCachingIndexClient = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrMetricNameLabelMissing = errors.New("metric name label missing") + var ErrNotSupported = errors.New("not supported") + func ExpectTables(ctx context.Context, client TableClient, expected []config.TableDesc) error + func ParseChunkTimeRangeValue(rangeValue []byte, value []byte) (chunkID string, labelValue model.LabelValue, err error) + type Bucket struct + type BucketClient interface + DeleteChunksBefore func(ctx context.Context, ts time.Time) error + type Bytes []byte + func (bs *Bytes) Compare(other Bytes) int + func (bs *Bytes) Equal(other Bytes) bool + func (bs *Bytes) Marshal() ([]byte, error) + func (bs *Bytes) MarshalTo(data []byte) (n int, err error) + func (bs *Bytes) Size() int + func (bs *Bytes) Unmarshal(data []byte) error + type CacheEntry struct + Column Bytes + Value Bytes + func (*CacheEntry) Descriptor() ([]byte, []int) + func (*CacheEntry) ProtoMessage() + func (m *CacheEntry) Marshal() (dAtA []byte, err error) + func (m *CacheEntry) MarshalTo(dAtA []byte) (int, error) + func (m *CacheEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *CacheEntry) Reset() + func (m *CacheEntry) Size() (n int) + func (m *CacheEntry) Unmarshal(dAtA []byte) error + func (m *CacheEntry) XXX_DiscardUnknown() + func (m *CacheEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CacheEntry) XXX_Merge(src proto.Message) + func (m *CacheEntry) XXX_Size() int + func (m *CacheEntry) XXX_Unmarshal(b []byte) error + func (this *CacheEntry) Equal(that interface{}) bool + func (this *CacheEntry) GoString() string + func (this *CacheEntry) String() string + type CardinalityExceededError struct + LabelName string + Limit int32 + MetricName string + Size int32 + func (e CardinalityExceededError) Error() string + type Client interface + BatchWrite func(context.Context, WriteBatch) error + NewWriteBatch func() WriteBatch + QueryPages func(ctx context.Context, queries []Query, callback QueryPagesCallback) error + Stop func() + func NewCachingIndexClient(client Client, c cache.Cache, validity time.Duration, limits StoreLimits, ...) Client + type Entry struct + HashValue string + RangeValue []byte + TableName string + Value []byte + type EntryProcessor interface + AcceptUser func(user string) bool + Flush func() error + ProcessIndexEntry func(indexEntry Entry) error + type ExtraTables struct + TableClient TableClient + Tables []config.TableDesc + type Query struct + HashValue string + Immutable bool + RangeValuePrefix []byte + RangeValueStart []byte + TableName string + ValueEqual []byte + type QueryPagesCallback func(Query, ReadBatchResult) bool + func QueryFilter(callback QueryPagesCallback) QueryPagesCallback + type ReadBatch struct + Cardinality int32 + Entries []CacheEntry + Expiry int64 + Key string + func (*ReadBatch) Descriptor() ([]byte, []int) + func (*ReadBatch) ProtoMessage() + func (b ReadBatch) Iterator() ReadBatchIterator + func (m *ReadBatch) GetCardinality() int32 + func (m *ReadBatch) GetEntries() []CacheEntry + func (m *ReadBatch) GetExpiry() int64 + func (m *ReadBatch) GetKey() string + func (m *ReadBatch) Marshal() (dAtA []byte, err error) + func (m *ReadBatch) MarshalTo(dAtA []byte) (int, error) + func (m *ReadBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *ReadBatch) Reset() + func (m *ReadBatch) Size() (n int) + func (m *ReadBatch) Unmarshal(dAtA []byte) error + func (m *ReadBatch) XXX_DiscardUnknown() + func (m *ReadBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ReadBatch) XXX_Merge(src proto.Message) + func (m *ReadBatch) XXX_Size() int + func (m *ReadBatch) XXX_Unmarshal(b []byte) error + func (this *ReadBatch) Equal(that interface{}) bool + func (this *ReadBatch) GoString() string + func (this *ReadBatch) String() string + type ReadBatchIterator interface + Next func() bool + RangeValue func() []byte + Value func() []byte + type ReadBatchResult interface + Iterator func() ReadBatchIterator + type Reader interface + IndexTableNames func(ctx context.Context) ([]string, error) + ReadIndexEntries func(ctx context.Context, table string, processors []EntryProcessor) error + type SeriesStoreSchema interface + FilterReadQueries func(queries []Query, shard *astmapper.ShardAnnotation) []Query + GetCacheKeysAndLabelWriteEntries func(from, through model.Time, userID string, metricName string, ...) ([]string, [][]Entry, error) + GetChunkWriteEntries func(from, through model.Time, userID string, metricName string, ...) ([]Entry, error) + GetChunksForSeries func(from, through model.Time, userID string, seriesID []byte) ([]Query, error) + GetLabelNamesForSeries func(from, through model.Time, userID string, seriesID []byte) ([]Query, error) + GetReadQueriesForMetric func(from, through model.Time, userID string, metricName string) ([]Query, error) + GetReadQueriesForMetricLabel func(from, through model.Time, userID string, metricName string, labelName string) ([]Query, error) + GetReadQueriesForMetricLabelValue func(from, through model.Time, userID string, metricName string, labelName string, ...) ([]Query, error) + func CreateSchema(cfg config.PeriodConfig) (SeriesStoreSchema, error) + func NewSchemaCaching(schema SeriesStoreSchema, cacheOlderThan time.Duration) SeriesStoreSchema + type StoreLimits interface + CardinalityLimit func(string) int + type TableClient interface + CreateTable func(ctx context.Context, desc config.TableDesc) error + DeleteTable func(ctx context.Context, name string) error + DescribeTable func(ctx context.Context, name string) (desc config.TableDesc, isActive bool, err error) + ListTables func(ctx context.Context) ([]string, error) + Stop func() + UpdateTable func(ctx context.Context, current, expected config.TableDesc) error + type TableManager struct + func NewTableManager(cfg TableManagerConfig, schemaCfg config.SchemaConfig, ...) (*TableManager, error) + func (m *TableManager) SyncTables(ctx context.Context) error + type TableManagerConfig struct + ChunkTables config.ProvisionConfig + CreationGracePeriod time.Duration + IndexTables config.ProvisionConfig + PollInterval time.Duration + RetentionDeletesEnabled bool + RetentionPeriod time.Duration + RetentionPeriodModel model.Duration + ThroughputUpdatesDisabled bool + func (cfg *TableManagerConfig) MarshalYAML() (interface{}, error) + func (cfg *TableManagerConfig) RegisterFlags(f *flag.FlagSet) + func (cfg *TableManagerConfig) UnmarshalYAML(unmarshal func(interface{}) error) error + func (cfg *TableManagerConfig) Validate() error + type WriteBatch interface + Add func(tableName, hashValue string, rangeValue []byte, value []byte) + Delete func(tableName, hashValue string, rangeValue []byte)