Documentation
¶
Index ¶
- func ConvertM3DBSeriesIterators(result consolidators.SeriesFetchResult, bounds models.Bounds, opts Options) ([]block.Block, error)
- func NewEncodedBlock(result consolidators.SeriesFetchResult, bounds models.Bounds, lastBlock bool, ...) (block.Block, error)
- func NewEncodedSeriesIter(meta block.Metadata, seriesMetas []block.SeriesMeta, ...) block.SeriesIter
- type BlockSeriesProcessor
- type BlockSeriesProcessorFn
- type GraphiteBlockIteratorsFn
- type IteratorBatchingFn
- type Options
- type SeriesIteratorProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertM3DBSeriesIterators ¶
func ConvertM3DBSeriesIterators( result consolidators.SeriesFetchResult, bounds models.Bounds, opts Options, ) ([]block.Block, error)
ConvertM3DBSeriesIterators converts series iterators to iterator blocks. If lookback is greater than 0, converts the entire series into a single block, otherwise, splits the series into blocks.
func NewEncodedBlock ¶ added in v0.5.0
func NewEncodedBlock( result consolidators.SeriesFetchResult, bounds models.Bounds, lastBlock bool, opts Options, ) (block.Block, error)
NewEncodedBlock builds an encoded block.
func NewEncodedSeriesIter ¶ added in v0.15.0
func NewEncodedSeriesIter( meta block.Metadata, seriesMetas []block.SeriesMeta, seriesIters []encoding.SeriesIterator, lookback time.Duration, instrumented bool, ) block.SeriesIter
NewEncodedSeriesIter creates a new encoded series iterator.
Types ¶
type BlockSeriesProcessor ¶ added in v1.0.0
type BlockSeriesProcessor interface {
Process(bl block.Block, opts Options, fn BlockSeriesProcessorFn) error
}
BlockSeriesProcessor processes blocks.
func NewBlockSeriesProcessor ¶ added in v1.0.0
func NewBlockSeriesProcessor() BlockSeriesProcessor
NewBlockSeriesProcessor creates a standard block processor.
type BlockSeriesProcessorFn ¶ added in v1.0.0
type BlockSeriesProcessorFn func( iter block.SeriesIter, ) error
BlockSeriesProcessorFn processes an individual series iterator.
type GraphiteBlockIteratorsFn ¶ added in v1.0.0
type GraphiteBlockIteratorsFn func( block.Block, ) ([]block.SeriesIterBatch, error)
GraphiteBlockIteratorsFn returns block iterators for graphite decoding.
type IteratorBatchingFn ¶ added in v0.15.0
type IteratorBatchingFn func( concurrency int, seriesBlockIterators []encoding.SeriesIterator, seriesMetas []block.SeriesMeta, meta block.Metadata, opts Options, ) ([]block.SeriesIterBatch, error)
IteratorBatchingFn determines how the iterator is split into batches.
type Options ¶ added in v0.5.0
type Options interface { // SetSplitSeriesByBlock determines if the converter will split the series // by blocks, or if it will instead treat the entire series as a single block. SetSplitSeriesByBlock(bool) Options // SplittingSeriesByBlock returns true iff lookback duration is 0, and the // options has not been forced to return a single block. SplittingSeriesByBlock() bool // SetLookbackDuration sets the lookback duration. SetLookbackDuration(time.Duration) Options // LookbackDuration returns the lookback duration. LookbackDuration() time.Duration // SetLookbackDuration sets the consolidation function for the converter. SetConsolidationFunc(consolidators.ConsolidationFunc) Options // LookbackDuration returns the consolidation function. ConsolidationFunc() consolidators.ConsolidationFunc // SetLookbackDuration sets the tag options for the converter. SetTagOptions(models.TagOptions) Options // TagOptions returns the tag options. TagOptions() models.TagOptions // SetIterAlloc sets the iterator allocator. SetIterAlloc(encoding.ReaderIteratorAllocate) Options // IterAlloc returns the reader iterator allocator. IterAlloc() encoding.ReaderIteratorAllocate // SetIteratorPools sets the iterator pools for the converter. SetIteratorPools(encoding.IteratorPools) Options // IteratorPools returns the iterator pools for the converter. IteratorPools() encoding.IteratorPools // SetCheckedBytesPool sets the checked bytes pool for the converter. SetCheckedBytesPool(pool.CheckedBytesPool) Options // CheckedBytesPool returns the checked bytes pools for the converter. CheckedBytesPool() pool.CheckedBytesPool // SetReadWorkerPool sets the read worker pool for the converter. SetReadWorkerPool(xsync.PooledWorkerPool) Options // ReadWorkerPool returns the read worker pool for the converter. ReadWorkerPool() xsync.PooledWorkerPool // SetReadWorkerPool sets the write worker pool for the converter. SetWriteWorkerPool(xsync.PooledWorkerPool) Options // ReadWorkerPool returns the write worker pool for the converter. WriteWorkerPool() xsync.PooledWorkerPool // SetSeriesConsolidationMatchOptions sets series consolidation options. SetSeriesConsolidationMatchOptions(value queryconsolidator.MatchOptions) Options // SetSeriesConsolidationMatchOptions sets series consolidation options. SeriesConsolidationMatchOptions() queryconsolidator.MatchOptions // SetSeriesIteratorProcessor sets the series iterator processor. SetSeriesIteratorProcessor(SeriesIteratorProcessor) Options // SeriesIteratorProcessor returns the series iterator processor. SeriesIteratorProcessor() SeriesIteratorProcessor // SetIteratorBatchingFn sets the batching function for the converter. SetIteratorBatchingFn(IteratorBatchingFn) Options // IteratorBatchingFn returns the batching function for the converter. IteratorBatchingFn() IteratorBatchingFn // SetBlockSeriesProcessor set the block series processor. SetBlockSeriesProcessor(value BlockSeriesProcessor) Options // BlockSeriesProcessor returns the block series processor. BlockSeriesProcessor() BlockSeriesProcessor // SetCustomAdminOptions sets custom admin options. SetCustomAdminOptions([]client.CustomAdminOption) Options // CustomAdminOptions gets custom admin options. CustomAdminOptions() []client.CustomAdminOption // SetInstrumented marks if the encoding step should have instrumentation enabled. SetInstrumented(bool) Options // Instrumented returns if the encoding step should have instrumentation enabled. Instrumented() bool // Validate ensures that the given block options are valid. Validate() error }
Options describes the options for encoded block converters. These options are generally config-backed and don't usually change across queries, unless certain query string parameters are present.
func NewOptions ¶ added in v0.5.0
func NewOptions() Options
NewOptions creates a default encoded block options which dictates how encoded blocks are generated.
type SeriesIteratorProcessor ¶ added in v0.15.14
type SeriesIteratorProcessor interface { // InspectSeries inspects SeriesIterator slices for a given query. InspectSeries( ctx context.Context, query index.Query, queryOpts index.QueryOptions, seriesIterators []encoding.SeriesIterator, ) error }
SeriesIteratorProcessor optionally defines methods to process series iterators.