Documentation ¶
Index ¶
- func ValidateConfig(b *BlockConfig) error
- type BackendBlock
- type BlockConfig
- type CompactorBlock
- func (c *CompactorBlock) AddObject(id common.ID, object []byte) error
- func (c *CompactorBlock) BlockMeta() *backend.BlockMeta
- func (c *CompactorBlock) Complete(ctx context.Context, tracker backend.AppendTracker, w backend.Writer) (int, error)
- func (c *CompactorBlock) CurrentBufferLength() int
- func (c *CompactorBlock) CurrentBufferedObjects() int
- func (c *CompactorBlock) FlushBuffer(ctx context.Context, tracker backend.AppendTracker, w backend.Writer) (backend.AppendTracker, int, error)
- func (c *CompactorBlock) Length() int
- type CompleteBlock
- func (c *CompleteBlock) BlockMeta() *backend.BlockMeta
- func (c *CompleteBlock) Clear() error
- func (c *CompleteBlock) Find(id common.ID, combiner common.ObjectCombiner) ([]byte, error)
- func (c *CompleteBlock) FlushedTime() time.Time
- func (c *CompleteBlock) Write(ctx context.Context, w backend.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateConfig ¶ added in v0.6.0
func ValidateConfig(b *BlockConfig) error
ValidateConfig returns true if the config is valid
Types ¶
type BackendBlock ¶ added in v0.5.0
type BackendBlock struct {
// contains filtered or unexported fields
}
BackendBlock represents a block already in the backend.
func NewBackendBlock ¶ added in v0.5.0
NewBackendBlock returns a BackendBlock for the given backend.BlockMeta
It is version aware.
type BlockConfig ¶ added in v0.6.0
type BlockConfig struct { IndexDownsampleBytes int `yaml:"index_downsample_bytes"` BloomFP float64 `yaml:"bloom_filter_false_positive"` Encoding backend.Encoding `yaml:"encoding"` }
BlockConfig holds configuration options for newly created blocks
type CompactorBlock ¶ added in v0.5.0
type CompactorBlock struct {
// contains filtered or unexported fields
}
func NewCompactorBlock ¶ added in v0.5.0
func NewCompactorBlock(cfg *BlockConfig, id uuid.UUID, tenantID string, metas []*backend.BlockMeta, estimatedObjects int) (*CompactorBlock, error)
NewCompactorBlock creates a ... new compactor block!
func (*CompactorBlock) AddObject ¶ added in v0.5.0
func (c *CompactorBlock) AddObject(id common.ID, object []byte) error
func (*CompactorBlock) BlockMeta ¶ added in v0.5.0
func (c *CompactorBlock) BlockMeta() *backend.BlockMeta
func (*CompactorBlock) Complete ¶ added in v0.5.0
func (c *CompactorBlock) Complete(ctx context.Context, tracker backend.AppendTracker, w backend.Writer) (int, error)
Complete finishes writes the compactor metadata and closes all buffers and appenders
func (*CompactorBlock) CurrentBufferLength ¶ added in v0.5.0
func (c *CompactorBlock) CurrentBufferLength() int
func (*CompactorBlock) CurrentBufferedObjects ¶ added in v0.5.0
func (c *CompactorBlock) CurrentBufferedObjects() int
func (*CompactorBlock) FlushBuffer ¶ added in v0.5.0
func (c *CompactorBlock) FlushBuffer(ctx context.Context, tracker backend.AppendTracker, w backend.Writer) (backend.AppendTracker, int, error)
FlushBuffer flushes any existing objects to the backend
func (*CompactorBlock) Length ¶ added in v0.5.0
func (c *CompactorBlock) Length() int
type CompleteBlock ¶ added in v0.5.0
type CompleteBlock struct {
// contains filtered or unexported fields
}
CompleteBlock represent a block that has been "cut", is ready to be flushed and is not appendable. A CompleteBlock also knows the filepath of the append wal file it was cut from. It is responsible for cleaning this block up once it has been flushed to the backend.
func NewCompleteBlock ¶ added in v0.5.0
func NewCompleteBlock(cfg *BlockConfig, originatingMeta *backend.BlockMeta, iterator common.Iterator, estimatedObjects int, filepath string, walFilename string) (*CompleteBlock, error)
NewCompleteBlock creates a new block and takes _ALL_ the parameters necessary to build the ordered, deduped file on disk
func (*CompleteBlock) BlockMeta ¶ added in v0.5.0
func (c *CompleteBlock) BlockMeta() *backend.BlockMeta
BlockMeta returns a pointer to this blocks meta
func (*CompleteBlock) Clear ¶ added in v0.5.0
func (c *CompleteBlock) Clear() error
Clear removes the backing file.
func (*CompleteBlock) Find ¶ added in v0.5.0
func (c *CompleteBlock) Find(id common.ID, combiner common.ObjectCombiner) ([]byte, error)
Find searches the for the provided trace id. A CompleteBlock should never
have multiples of a single id so not sure why this uses a DedupingFinder.
func (*CompleteBlock) FlushedTime ¶ added in v0.5.0
func (c *CompleteBlock) FlushedTime() time.Time
FlushedTime returns the time the block was flushed. Will return 0
if the block was never flushed