Documentation ¶
Index ¶
- Constants
- func Encode(tr Reader) ([]byte, error)
- func WriteFile(logger log.Logger, dir string, tr Reader) (int64, error)
- type Interval
- type Intervals
- type MemTombstones
- func (t *MemTombstones) AddInterval(ref storage.SeriesRef, itvs ...Interval)
- func (*MemTombstones) Close() error
- func (t *MemTombstones) DeleteTombstones(refs map[storage.SeriesRef]struct{})
- func (t *MemTombstones) Get(ref storage.SeriesRef) (Intervals, error)
- func (t *MemTombstones) Iter(f func(storage.SeriesRef, Intervals) error) error
- func (t *MemTombstones) Total() uint64
- func (t *MemTombstones) TruncateBefore(beforeT int64)
- type Reader
- type Stone
Constants ¶
View Source
const (
// MagicTombstone is 4 bytes at the head of a tombstone file.
MagicTombstone = 0x0130BA30
)
View Source
const TombstonesFilename = "tombstones"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Interval ¶
type Interval struct {
Mint, Maxt int64
}
Interval represents a single time-interval.
func (Interval) IsSubrange ¶
type Intervals ¶
type Intervals []Interval
Intervals represents a set of increasing and non-overlapping time-intervals.
type MemTombstones ¶
type MemTombstones struct {
// contains filtered or unexported fields
}
func NewMemTombstones ¶
func NewMemTombstones() *MemTombstones
NewMemTombstones creates new in memory Tombstone Reader that allows adding new intervals.
func NewTestMemTombstones ¶
func NewTestMemTombstones(intervals []Intervals) *MemTombstones
func (*MemTombstones) AddInterval ¶
func (t *MemTombstones) AddInterval(ref storage.SeriesRef, itvs ...Interval)
AddInterval to an existing memTombstones.
func (*MemTombstones) Close ¶
func (*MemTombstones) Close() error
func (*MemTombstones) DeleteTombstones ¶
func (t *MemTombstones) DeleteTombstones(refs map[storage.SeriesRef]struct{})
func (*MemTombstones) Total ¶
func (t *MemTombstones) Total() uint64
func (*MemTombstones) TruncateBefore ¶
func (t *MemTombstones) TruncateBefore(beforeT int64)
type Reader ¶
type Reader interface { // Get returns deletion intervals for the series with the given reference. Get(ref storage.SeriesRef) (Intervals, error) // Iter calls the given function for each encountered interval. Iter(func(storage.SeriesRef, Intervals) error) error // Total returns the total count of tombstones. Total() uint64 // Close any underlying resources Close() error }
Reader gives access to tombstone intervals by series reference.
Click to show internal directories.
Click to hide internal directories.