Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Open ¶
func Open(path string, r prometheus.Registerer, opts *Options) (storage.Storage, error)
Open returns a new storage backed by a tsdb database.
Types ¶
type Options ¶
type Options struct { // The interval at which the write ahead log is flushed to disc. WALFlushInterval time.Duration // The timestamp range of head blocks after which they get persisted. // It's the minimum duration of any persisted block. MinBlockDuration time.Duration // The maximum timestamp range of compacted blocks. MaxBlockDuration time.Duration // Number of head blocks that can be appended to. // Should be two or higher to prevent write errors in general scenarios. // // After a new block is started for timestamp t0 or higher, appends with // timestamps as early as t0 - (n-1) * MinBlockDuration are valid. AppendableBlocks int // Duration for how long to retain data. Retention time.Duration }
Options of the DB storage.
Click to show internal directories.
Click to hide internal directories.