Documentation ¶
Index ¶
- Variables
- func FindSetMatches(pattern string) []string
- type IndexGatewayClient
- type IndexGatewayClientStore
- func (c *IndexGatewayClientStore) GetChunkRefs(ctx context.Context, userID string, from, through model.Time, ...) ([]logproto.ChunkRef, error)
- func (c *IndexGatewayClientStore) GetSeries(ctx context.Context, userID string, from, through model.Time, ...) ([]labels.Labels, error)
- func (c *IndexGatewayClientStore) LabelNamesForMetricName(ctx context.Context, userID string, from, through model.Time, ...) ([]string, error)
- func (c *IndexGatewayClientStore) LabelValuesForMetricName(ctx context.Context, userID string, from, through model.Time, ...) ([]string, error)
- func (c *IndexGatewayClientStore) SetChunkFilterer(chunkFilter chunk.RequestChunkFilterer)
- func (c *IndexGatewayClientStore) Stats(ctx context.Context, userID string, from, through model.Time, ...) (*stats.Stats, error)
- type IndexStore
- type IndexWriter
- type SchemaWrites
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DedupedChunksTotal = promauto.NewCounter(prometheus.CounterOpts{ Namespace: "loki", Name: "chunk_store_deduped_chunks_total", Help: "Count of chunks which were not stored because they have already been stored by another replica.", }) IndexEntriesPerChunk = promauto.NewHistogram(prometheus.HistogramOpts{ Namespace: "loki", Name: "chunk_store_index_entries_per_chunk", Help: "Number of entries written to storage per chunk.", Buckets: prometheus.ExponentialBuckets(1, 2, 5), }) )
Functions ¶
func FindSetMatches ¶
FindSetMatches returns list of values that can be equality matched on. copied from Prometheus querier.go, removed check for Prometheus wrapper.
Types ¶
type IndexGatewayClient ¶
type IndexGatewayClient interface { GetChunkRef(ctx context.Context, in *logproto.GetChunkRefRequest, opts ...grpc.CallOption) (*logproto.GetChunkRefResponse, error) GetSeries(ctx context.Context, in *logproto.GetSeriesRequest, opts ...grpc.CallOption) (*logproto.GetSeriesResponse, error) LabelNamesForMetricName(ctx context.Context, in *logproto.LabelNamesForMetricNameRequest, opts ...grpc.CallOption) (*logproto.LabelResponse, error) LabelValuesForMetricName(ctx context.Context, in *logproto.LabelValuesForMetricNameRequest, opts ...grpc.CallOption) (*logproto.LabelResponse, error) GetStats(ctx context.Context, req *logproto.IndexStatsRequest, opts ...grpc.CallOption) (*logproto.IndexStatsResponse, error) }
type IndexGatewayClientStore ¶
type IndexGatewayClientStore struct {
// contains filtered or unexported fields
}
func (*IndexGatewayClientStore) GetChunkRefs ¶
func (*IndexGatewayClientStore) LabelNamesForMetricName ¶
func (c *IndexGatewayClientStore) LabelNamesForMetricName(ctx context.Context, userID string, from, through model.Time, metricName string) ([]string, error)
LabelNamesForMetricName retrieves all label names for a metric name.
func (*IndexGatewayClientStore) LabelValuesForMetricName ¶
func (*IndexGatewayClientStore) SetChunkFilterer ¶
func (c *IndexGatewayClientStore) SetChunkFilterer(chunkFilter chunk.RequestChunkFilterer)
type IndexStore ¶
type IndexStore 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) Stats(ctx context.Context, userID string, from, through model.Time, matchers ...*labels.Matcher) (*stats.Stats, 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) }
func NewIndexGatewayClientStore ¶
func NewIndexGatewayClientStore(client IndexGatewayClient, fallbackStore IndexStore) IndexStore
func NewIndexStore ¶
func NewIndexStore(schemaCfg config.SchemaConfig, schema index.SeriesStoreSchema, index index.Client, fetcher chunkFetcher, chunkBatchSize int) IndexStore
type IndexWriter ¶
type IndexWriter interface { NewWriteBatch() index.WriteBatch BatchWrite(context.Context, index.WriteBatch) error }
type SchemaWrites ¶
type SchemaWrites interface { GetChunkWriteEntries(from, through model.Time, userID string, metricName string, labels labels.Labels, chunkID string) ([]index.Entry, error) GetCacheKeysAndLabelWriteEntries(from, through model.Time, userID string, metricName string, labels labels.Labels, chunkID string) ([]string, [][]index.Entry, error) }
type Writer ¶
type Writer struct { DisableIndexDeduplication bool // contains filtered or unexported fields }
func NewWriter ¶
func NewWriter(fetcher *fetcher.Fetcher, schemaCfg config.SchemaConfig, indexWriter IndexWriter, schema SchemaWrites, writeDedupeCache cache.Cache, disableIndexDeduplication bool) *Writer
Source Files ¶
Click to show internal directories.
Click to hide internal directories.