tsdb

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const (
	BackendS3  = "s3"
	BackendGCS = "gcs"
)

Constants for the config values

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

Variables

This section is empty.

Functions

func FromLabelAdaptersToLabels

func FromLabelAdaptersToLabels(input []client.LabelAdapter) labels.Labels

FromLabelAdaptersToLabels converts []LabelAdapter to TSDB labels.Labels.

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 Config

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

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

Config holds the config information for TSDB storage

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
gcs
s3

Jump to

Keyboard shortcuts

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