tempodb

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 28 Imported by: 1

Documentation

Index

Constants

View Source
const (
	BlockIDMin = "00000000-0000-0000-0000-000000000000"
	BlockIDMax = "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"
)

Variables

This section is empty.

Functions

func New

func New(cfg *Config, logger log.Logger) (Reader, Writer, Compactor, error)

Types

type CompactionBlockSelector

type CompactionBlockSelector interface {
	BlocksToCompact() ([]*backend.BlockMeta, string)
}

CompactionBlockSelector is an interface for different algorithms to pick suitable blocks for compaction

type Compactor

type Compactor interface {
	EnableCompaction(cfg *CompactorConfig, sharder CompactorSharder)
}

type CompactorConfig

type CompactorConfig struct {
	ChunkSizeBytes          uint32        `yaml:"chunk_size_bytes"` // todo: do we need this?
	FlushSizeBytes          uint32        `yaml:"flush_size_bytes"`
	MaxCompactionRange      time.Duration `yaml:"compaction_window"`
	MaxCompactionObjects    int           `yaml:"max_compaction_objects"`
	BlockRetention          time.Duration `yaml:"block_retention"`
	CompactedBlockRetention time.Duration `yaml:"compacted_block_retention"`
}

type CompactorSharder

type CompactorSharder interface {
	Combine(objA []byte, objB []byte) []byte
	Owns(hash string) bool
}

type Config

type Config struct {
	Backend string        `yaml:"backend"`
	Local   *local.Config `yaml:"local"`
	GCS     *gcs.Config   `yaml:"gcs"`
	S3      *s3.Config    `yaml:"s3"`
	Azure   *azure.Config `yaml:"azure"`
	Pool    *pool.Config  `yaml:"pool,omitempty"`
	WAL     *wal.Config   `yaml:"wal"`

	Memcached *memcached.Config `yaml:"memcached"`
	Redis     *redis.Config     `yaml:"redis"`

	BlocklistPoll time.Duration `yaml:"blocklist_poll"`
}

type Reader

type Reader interface {
	Find(ctx context.Context, tenantID string, id encoding.ID, blockStart string, blockEnd string) ([]byte, encoding.FindMetrics, error)
	Shutdown()
}

type WriteableBlock added in v0.5.0

type WriteableBlock interface {
	Write(ctx context.Context, w backend.Writer) error
}

type Writer

type Writer interface {
	WriteBlock(ctx context.Context, block WriteableBlock) error
	WAL() *wal.WAL
}

Directories

Path Synopsis
gcs
s3

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL