Documentation
¶
Index ¶
- type ChunkWriter
- type CompositeStore
- func (c *CompositeStore) AddStore(start model.Time, fetcher *fetcher.Fetcher, index Index, writer ChunkWriter, ...)
- func (c CompositeStore) GetChunkFetcher(tm model.Time) *fetcher.Fetcher
- func (c CompositeStore) GetChunkRefs(ctx context.Context, userID string, from, through model.Time, ...) ([][]chunk.Chunk, []*fetcher.Fetcher, error)
- func (c CompositeStore) GetSeries(ctx context.Context, userID string, from, through model.Time, ...) ([]labels.Labels, error)
- func (c CompositeStore) LabelNamesForMetricName(ctx context.Context, userID string, from, through model.Time, ...) ([]string, error)
- func (c CompositeStore) LabelValuesForMetricName(ctx context.Context, userID string, from, through model.Time, ...) ([]string, error)
- func (c CompositeStore) Put(ctx context.Context, chunks []chunk.Chunk) error
- func (c CompositeStore) PutOne(ctx context.Context, from, through model.Time, chunk chunk.Chunk) error
- func (c CompositeStore) SetChunkFilterer(chunkFilter chunk.RequestChunkFilterer)
- func (c CompositeStore) Stop()
- func (c *CompositeStore) Stores() []Store
- type Index
- type Store
- type StoreLimits
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChunkWriter ¶
type CompositeStore ¶
type CompositeStore struct {
// contains filtered or unexported fields
}
CompositeStore is a Store which delegates to various stores depending on when they were activated.
func NewCompositeStore ¶
func NewCompositeStore(limits StoreLimits) *CompositeStore
NewCompositeStore creates a new Store which delegates to different stores depending on time.
func (*CompositeStore) AddStore ¶
func (c *CompositeStore) AddStore(start model.Time, fetcher *fetcher.Fetcher, index Index, writer ChunkWriter, stop func())
func (CompositeStore) GetChunkFetcher ¶
func (CompositeStore) GetChunkRefs ¶
func (CompositeStore) LabelNamesForMetricName ¶
func (c CompositeStore) LabelNamesForMetricName(ctx context.Context, userID string, from, through model.Time, metricName string) ([]string, error)
LabelNamesForMetricName retrieves all label names for a metric name.
func (CompositeStore) LabelValuesForMetricName ¶
func (c CompositeStore) LabelValuesForMetricName(ctx context.Context, userID string, from, through model.Time, metricName string, labelName string, matchers ...*labels.Matcher) ([]string, error)
LabelValuesForMetricName retrieves all label values for a single label name and metric name.
func (CompositeStore) SetChunkFilterer ¶
func (c CompositeStore) SetChunkFilterer(chunkFilter chunk.RequestChunkFilterer)
func (*CompositeStore) Stores ¶
func (c *CompositeStore) Stores() []Store
type Index ¶
type Index interface {
GetChunkRefs(ctx context.Context, userID string, from, through model.Time, matchers ...*labels.Matcher) ([]logproto.ChunkRef, error)
GetSeries(ctx context.Context, userID string, from, through model.Time, matchers ...*labels.Matcher) ([]labels.Labels, error)
LabelValuesForMetricName(ctx context.Context, userID string, from, through model.Time, metricName string, labelName string, matchers ...*labels.Matcher) ([]string, error)
LabelNamesForMetricName(ctx context.Context, userID string, from, through model.Time, metricName string) ([]string, error)
// SetChunkFilterer sets a chunk filter to be used when retrieving chunks.
// This is only used for GetSeries implementation.
// Todo we might want to pass it as a parameter to GetSeries instead.
SetChunkFilterer(chunkFilter chunk.RequestChunkFilterer)
}
type Store ¶
type Store interface {
Put(ctx context.Context, chunks []chunk.Chunk) error
PutOne(ctx context.Context, from, through model.Time, chunk chunk.Chunk) error
// GetChunkRefs returns the un-loaded chunks and the fetchers to be used to load them. You can load each slice of chunks ([]Chunk),
// using the corresponding Fetcher (fetchers[i].FetchChunks(ctx, chunks[i], ...)
GetChunkRefs(ctx context.Context, userID string, from, through model.Time, matchers ...*labels.Matcher) ([][]chunk.Chunk, []*fetcher.Fetcher, error)
GetSeries(ctx context.Context, userID string, from, through model.Time, matchers ...*labels.Matcher) ([]labels.Labels, error)
LabelValuesForMetricName(ctx context.Context, userID string, from, through model.Time, metricName string, labelName string, matchers ...*labels.Matcher) ([]string, error)
LabelNamesForMetricName(ctx context.Context, userID string, from, through model.Time, metricName string) ([]string, error)
GetChunkFetcher(tm model.Time) *fetcher.Fetcher
SetChunkFilterer(chunkFilter chunk.RequestChunkFilterer)
Stop()
}
Store for chunks.
Click to show internal directories.
Click to hide internal directories.