Documentation
¶
Index ¶
- func IsBlockOverlapping(b chunkenc.Block, with *LazyChunk, direction logproto.Direction) bool
- func NewChunkClient(name, component string, cfg Config, schemaCfg config.SchemaConfig, ...) (client.Client, error)
- func NewObjectClient(name, component string, cfg Config, clientMetrics ClientMetrics) (client.ObjectClient, error)
- type AsyncStore
- func (a *AsyncStore) GetChunks(ctx context.Context, userID string, from, through model.Time, ...) ([][]chunk.Chunk, []*fetcher.Fetcher, error)
- func (a *AsyncStore) GetShards(ctx context.Context, userID string, from, through model.Time, ...) (*logproto.ShardsResponse, error)
- func (a *AsyncStore) Stats(ctx context.Context, userID string, from, through model.Time, ...) (*stats.Stats, error)
- func (a *AsyncStore) Volume(ctx context.Context, userID string, from, through model.Time, limit int32, ...) (*logproto.VolumeResponse, error)
- type AsyncStoreCfg
- type ChunkMetrics
- type ClientMetrics
- type Config
- type IngesterQuerier
- type Instrumentable
- type LazyChunk
- func (c *LazyChunk) IsOverlapping(with *LazyChunk, direction logproto.Direction) bool
- func (c *LazyChunk) Iterator(ctx context.Context, from, through time.Time, direction logproto.Direction, ...) (iter.EntryIterator, error)
- func (c *LazyChunk) SampleIterator(ctx context.Context, from, through time.Time, nextChunk *LazyChunk, ...) (iter.SampleIterator, error)
- type LokiStore
- func (s *LokiStore) FlushIndexes(ctx context.Context) error
- func (s *LokiStore) GetSchemaConfigs() []config.PeriodConfig
- func (s *LokiStore) SelectLogs(ctx context.Context, req logql.SelectLogParams) (iter.EntryIterator, error)
- func (s *LokiStore) SelectSamples(ctx context.Context, req logql.SelectSampleParams) (iter.SampleIterator, error)
- func (s *LokiStore) SelectSeries(ctx context.Context, req logql.SelectLogParams) ([]logproto.SeriesIdentifier, error)
- func (s *LokiStore) SetChunkFilterer(chunkFilterer chunk.RequestChunkFilterer)
- func (s *LokiStore) SetExtractorWrapper(wrapper lokilog.SampleExtractorWrapper)
- func (s *LokiStore) SetPipelineWrapper(wrapper lokilog.PipelineWrapper)
- func (s *LokiStore) SyncStatuses() []index.SyncStatus
- func (s *LokiStore) TriggerSync() bool
- type NamedAWSStorageConfig
- type NamedBOSStorageConfig
- type NamedBlobStorageConfig
- type NamedCOSConfig
- type NamedFSConfig
- type NamedGCSConfig
- type NamedOssConfig
- type NamedStores
- type NamedSwiftConfig
- type SchemaConfigProvider
- type SelectStore
- type Store
- type StoreLimits
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBlockOverlapping ¶
func NewChunkClient ¶
func NewChunkClient(name, component string, cfg Config, schemaCfg config.SchemaConfig, p config.PeriodConfig, registerer prometheus.Registerer, clientMetrics ClientMetrics, logger log.Logger) (client.Client, error)
NewChunkClient makes a new chunk.Client of the desired types.
func NewObjectClient ¶
func NewObjectClient(name, component string, cfg Config, clientMetrics ClientMetrics) (client.ObjectClient, error)
NewObjectClient makes a new StorageClient with the prefix in the front.
Types ¶
type AsyncStore ¶
AsyncStore does querying to both ingesters and chunk store and combines the results after deduping them. This should be used when using an async store like tsdb. AsyncStore is meant to be used only in queriers or any other service other than ingesters. It should never be used in ingesters otherwise it would start spiraling around doing queries over and over again to other ingesters.
func NewAsyncStore ¶
func NewAsyncStore(cfg AsyncStoreCfg, store stores.Store, scfg config.SchemaConfig) *AsyncStore
type AsyncStoreCfg ¶
type AsyncStoreCfg struct {
IngesterQuerier IngesterQuerier
// QueryIngestersWithin defines maximum lookback beyond which ingesters are not queried for chunk ids.
QueryIngestersWithin time.Duration
}
type ChunkMetrics ¶
type ChunkMetrics struct {
// contains filtered or unexported fields
}
func NewChunkMetrics ¶
func NewChunkMetrics(r prometheus.Registerer, maxBatchSize int) *ChunkMetrics
type ClientMetrics ¶
type ClientMetrics struct {
AzureMetrics azure.BlobStorageMetrics
}
func NewClientMetrics ¶
func NewClientMetrics() ClientMetrics
func (*ClientMetrics) Unregister ¶
func (c *ClientMetrics) Unregister()
type Config ¶
type Config struct {
AlibabaStorageConfig alibaba.OssConfig `yaml:"alibabacloud"`
S3Config aws.S3Config `yaml:"aws"`
AzureStorageConfig azure.BlobStorageConfig `yaml:"azure"`
BOSStorageConfig baidubce.BOSStorageConfig `yaml:"bos"`
GCSConfig gcp.GCSConfig `yaml:"gcs" doc:"description=Configures storing chunks in GCS. Required fields only required when gcs is defined in config."`
FSConfig local.FSConfig `` /* 170-byte string literal not displayed */
Swift openstack.SwiftConfig `yaml:"swift"`
Hedging hedging.Config `yaml:"hedging"`
NamedStores NamedStores `yaml:"named_stores"`
COSConfig ibmcloud.COSConfig `yaml:"cos"`
CongestionControl congestion.Config `yaml:"congestion_control,omitempty"`
ObjectPrefix string `` /* 133-byte string literal not displayed */
MaxParallelGetChunk int `yaml:"max_parallel_get_chunk"`
UseThanosObjstore bool `yaml:"use_thanos_objstore"`
ObjectStore bucket.ConfigWithNamedStores `yaml:"object_store"`
MaxChunkBatchSize int `yaml:"max_chunk_batch_size"`
TSDBShipperConfig indexshipper.Config `` /* 213-byte string literal not displayed */
BloomShipperConfig bloomshipperconfig.Config `` /* 186-byte string literal not displayed */
// Config for using AsyncStore when using async index stores like `tsdb`.
// It is required for getting chunk ids of recently flushed chunks from the ingesters.
EnableAsyncStore bool `yaml:"-"`
AsyncStoreConfig AsyncStoreCfg `yaml:"-"`
// ObjectClientDecorator, if set, wraps every ObjectClient after creation.
// This is intended for testing (e.g. injecting latency simulation).
ObjectClientDecorator func(client.ObjectClient) client.ObjectClient `yaml:"-"`
}
Config chooses which storage client to use.
func (*Config) RegisterFlags ¶
RegisterFlags adds the flags required to configure this flag set.
type IngesterQuerier ¶
type IngesterQuerier interface {
GetChunkIDs(ctx context.Context, from, through model.Time, matchers ...*labels.Matcher) ([]string, error)
Stats(ctx context.Context, userID string, from, through model.Time, matchers ...*labels.Matcher) (*stats.Stats, error)
Volume(ctx context.Context, userID string, from, through model.Time, limit int32, targetLabels []string, aggregateBy string, matchers ...*labels.Matcher) (*logproto.VolumeResponse, error)
}
type Instrumentable ¶
type Instrumentable interface {
SetExtractorWrapper(wrapper lokilog.SampleExtractorWrapper)
SetPipelineWrapper(wrapper lokilog.PipelineWrapper)
}
type LazyChunk ¶
type LazyChunk struct {
Chunk chunk.Chunk
IsValid bool
Fetcher *fetcher.Fetcher
// contains filtered or unexported fields
}
LazyChunk loads the chunk when it is accessed.
func (*LazyChunk) IsOverlapping ¶
func (*LazyChunk) Iterator ¶
func (c *LazyChunk) Iterator( ctx context.Context, from, through time.Time, direction logproto.Direction, pipeline log.StreamPipeline, nextChunk *LazyChunk, hintRanges iter.HintTimeRanges, ) (iter.EntryIterator, error)
Iterator returns an entry iterator. The iterator returned will cache overlapping block's entries with the next chunk if passed. This way when we re-use them for ordering across batches we don't re-decompress the data again.
func (*LazyChunk) SampleIterator ¶
func (c *LazyChunk) SampleIterator( ctx context.Context, from, through time.Time, nextChunk *LazyChunk, extractor log.StreamSampleExtractor, hintRanges iter.HintTimeRanges, ) (iter.SampleIterator, error)
SampleIterator returns an sample iterator. The iterator returned will cache overlapping block's entries with the next chunk if passed. This way when we re-use them for ordering across batches we don't re-decompress the data again.
type LokiStore ¶
func NewStore ¶
func NewStore(cfg Config, storeCfg config.ChunkStoreConfig, schemaCfg config.SchemaConfig, limits StoreLimits, clientMetrics ClientMetrics, registerer prometheus.Registerer, logger log.Logger, metricsNamespace string, ) (*LokiStore, error)
NewStore creates a new Loki Store using configuration supplied.
func (*LokiStore) FlushIndexes ¶
FlushIndexes forces every writable index store collected at construction to build and ship its in-memory indexes (the TSDB head) to object storage.
func (*LokiStore) GetSchemaConfigs ¶
func (s *LokiStore) GetSchemaConfigs() []config.PeriodConfig
func (*LokiStore) SelectLogs ¶
func (s *LokiStore) SelectLogs(ctx context.Context, req logql.SelectLogParams) (iter.EntryIterator, error)
SelectLogs returns an iterator that will query the store for more chunks while iterating instead of fetching all chunks upfront for that request.
func (*LokiStore) SelectSamples ¶
func (s *LokiStore) SelectSamples(ctx context.Context, req logql.SelectSampleParams) (iter.SampleIterator, error)
func (*LokiStore) SelectSeries ¶
func (s *LokiStore) SelectSeries(ctx context.Context, req logql.SelectLogParams) ([]logproto.SeriesIdentifier, error)
func (*LokiStore) SetChunkFilterer ¶
func (s *LokiStore) SetChunkFilterer(chunkFilterer chunk.RequestChunkFilterer)
func (*LokiStore) SetExtractorWrapper ¶
func (s *LokiStore) SetExtractorWrapper(wrapper lokilog.SampleExtractorWrapper)
func (*LokiStore) SetPipelineWrapper ¶
func (s *LokiStore) SetPipelineWrapper(wrapper lokilog.PipelineWrapper)
func (*LokiStore) SyncStatuses ¶
func (s *LokiStore) SyncStatuses() []index.SyncStatus
SyncStatuses reports the sync status of each per-period index store, labeled with that store's name -- one entry per index the store syncs.
func (*LokiStore) TriggerSync ¶
TriggerSync starts a background index sync on every readable index store collected at construction, returning true if any started a new sync.
type NamedAWSStorageConfig ¶
func (*NamedAWSStorageConfig) UnmarshalYAML ¶
func (cfg *NamedAWSStorageConfig) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
func (*NamedAWSStorageConfig) Validate ¶
func (cfg *NamedAWSStorageConfig) Validate() error
type NamedBOSStorageConfig ¶
type NamedBOSStorageConfig baidubce.BOSStorageConfig
func (*NamedBOSStorageConfig) UnmarshalYAML ¶
func (cfg *NamedBOSStorageConfig) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type NamedBlobStorageConfig ¶
type NamedBlobStorageConfig azure.BlobStorageConfig
func (*NamedBlobStorageConfig) UnmarshalYAML ¶
func (cfg *NamedBlobStorageConfig) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
func (*NamedBlobStorageConfig) Validate ¶
func (cfg *NamedBlobStorageConfig) Validate() error
type NamedCOSConfig ¶
func (*NamedCOSConfig) UnmarshalYAML ¶
func (cfg *NamedCOSConfig) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type NamedFSConfig ¶
func (*NamedFSConfig) UnmarshalYAML ¶
func (cfg *NamedFSConfig) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type NamedGCSConfig ¶
func (*NamedGCSConfig) UnmarshalYAML ¶
func (cfg *NamedGCSConfig) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type NamedOssConfig ¶
func (*NamedOssConfig) UnmarshalYAML ¶
func (cfg *NamedOssConfig) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type NamedStores ¶
type NamedStores struct {
AWS map[string]NamedAWSStorageConfig `yaml:"aws"`
Azure map[string]NamedBlobStorageConfig `yaml:"azure"`
BOS map[string]NamedBOSStorageConfig `yaml:"bos"`
Filesystem map[string]NamedFSConfig `yaml:"filesystem"`
GCS map[string]NamedGCSConfig `yaml:"gcs"`
AlibabaCloud map[string]NamedOssConfig `yaml:"alibabacloud"`
Swift map[string]NamedSwiftConfig `yaml:"swift"`
COS map[string]NamedCOSConfig `yaml:"cos"`
// contains filtered or unexported fields
}
NamedStores helps configure additional object stores from a given storage provider
func (*NamedStores) Exists ¶
func (ns *NamedStores) Exists(name string) bool
func (*NamedStores) LookupStoreType ¶
func (ns *NamedStores) LookupStoreType(name string) (string, bool)
func (*NamedStores) Validate ¶
func (ns *NamedStores) Validate() error
type NamedSwiftConfig ¶
type NamedSwiftConfig openstack.SwiftConfig
func (*NamedSwiftConfig) UnmarshalYAML ¶
func (cfg *NamedSwiftConfig) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
func (*NamedSwiftConfig) Validate ¶
func (cfg *NamedSwiftConfig) Validate() error
type SchemaConfigProvider ¶
type SchemaConfigProvider interface {
GetSchemaConfigs() []config.PeriodConfig
}
type SelectStore ¶
type SelectStore interface {
SelectSamples(ctx context.Context, req logql.SelectSampleParams) (iter.SampleIterator, error)
SelectLogs(ctx context.Context, req logql.SelectLogParams) (iter.EntryIterator, error)
SelectSeries(ctx context.Context, req logql.SelectLogParams) ([]logproto.SeriesIdentifier, error)
}
type Store ¶
type Store interface {
stores.Store
SelectStore
SchemaConfigProvider
Instrumentable
index.Flusher
}
type StoreLimits ¶
type StoreLimits interface {
downloads.Limits
stores.StoreLimits
indexgateway.Limits
CardinalityLimit(string) int
}
StoreLimits helps get Limits specific to Queries for Stores
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
bloom
|
|
|
common
|
|
|
shipper/bloomshipper/config
package bloomshipperconfig resides in its own package to prevent circular imports with storage package
|
package bloomshipperconfig resides in its own package to prevent circular imports with storage package |