tsdb

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockMeta

type BlockMeta struct {
	*Meta
	BlockCount int
}

BlockMeta contains aggregated metadata of all the persistent blocks.

type HeadMeta

type HeadMeta struct {
	*Meta
	NumChunks uint64
}

HeadMeta contains metadata of the head block.

type Meta

type Meta struct {
	MaxTime    time.Time
	MinTime    time.Time
	NumSamples uint64
	NumSeries  uint64
	Size       int64
}

Meta contains metadata for a TSDB instance.

type Tsdb

type Tsdb struct {
	// contains filtered or unexported fields
}

Tsdb knows how to access a Prometheus tsdb.

func New

func New(dataDir string, logger *log.Logger) (*Tsdb, error)

New returns a new instance of Tsdb.

func (*Tsdb) Blocks

func (t *Tsdb) Blocks(minTimeNano, maxTimeNano int64) ([]*tsdb.Block, error)

Blocks looks for data blocks that fall within the provided time range, in the data directory.

func (*Tsdb) Close

func (t *Tsdb) Close() error

Close closes the underlying database connection.

func (*Tsdb) Meta

func (t *Tsdb) Meta() (*HeadMeta, *BlockMeta, error)

BlockMeta returns metadata of the TSDB persistent blocks.

Jump to

Keyboard shortcuts

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