Documentation ¶
Index ¶
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 uint64, itvs ...Interval)
AddInterval to an existing memTombstones.
func (*MemTombstones) Close ¶
func (*MemTombstones) Close() error
func (*MemTombstones) Total ¶
func (t *MemTombstones) Total() uint64
type Reader ¶
type Reader interface { // Get returns deletion intervals for the series with the given reference. Get(ref uint64) (Intervals, error) // Iter calls the given function for each encountered interval. Iter(func(uint64, 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.