tsdb

package
v0.5.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// BackendS3 is the value for the S3 storage backend
	BackendS3 = "s3"

	// BackendGCS is the value for the GCS storage backend
	BackendGCS = "gcs"

	// TenantIDExternalLabel is the external label set when shipping blocks to the storage
	TenantIDExternalLabel = "__org_id__"
)

Variables

This section is empty.

Functions

func NewBucketClient

func NewBucketClient(ctx context.Context, cfg Config, name string, logger log.Logger) (objstore.Bucket, error)

NewBucketClient creates a new bucket client based on the configured backend

Types

type BucketStoreConfig added in v0.6.0

type BucketStoreConfig struct {
	SyncDir              string `yaml:"sync_dir"`
	IndexCacheSizeBytes  uint64 `yaml:"index_cache_size_bytes"`
	MaxChunkPoolBytes    uint64 `yaml:"max_chunk_pool_bytes"`
	MaxSampleCount       uint64 `yaml:"max_sample_count"`
	MaxConcurrent        int    `yaml:"max_concurrent"`
	BlockSyncConcurrency int    `yaml:"block_sync_concurrency"`
}

BucketStoreConfig holds the config information for Bucket Stores used by the querier

func (*BucketStoreConfig) RegisterFlags added in v0.6.0

func (cfg *BucketStoreConfig) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers the BucketStore flags

type Config

type Config struct {
	Dir          string            `yaml:"dir"`
	BlockRanges  DurationList      `yaml:"block_ranges_period"`
	Retention    time.Duration     `yaml:"retention_period"`
	ShipInterval time.Duration     `yaml:"ship_interval"`
	Backend      string            `yaml:"backend"`
	BucketStore  BucketStoreConfig `yaml:"bucket_store"`

	// Backends
	S3  s3.Config  `yaml:"s3"`
	GCS gcs.Config `yaml:"gcs"`
}

Config holds the config information for TSDB storage

func (*Config) BlocksDir added in v0.6.0

func (cfg *Config) BlocksDir(userID string) string

BlocksDir returns the directory path where TSDB blocks and wal should be stored by the ingester

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers the TSDB flags

func (*Config) Validate

func (cfg *Config) Validate() error

Validate the config

type DurationList

type DurationList []time.Duration

DurationList is the block ranges for a tsdb

func (DurationList) Set

func (d DurationList) Set(s string) error

Set implements the flag.Var interface

func (DurationList) String

func (d DurationList) String() string

String implements the flag.Var interface

func (DurationList) ToMillisecondRanges

func (d DurationList) ToMillisecondRanges() []int64

ToMillisecondRanges returns the duration list in milliseconds

Directories

Path Synopsis
backend

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳