Documentation
¶
Index ¶
- Variables
- type BlockRange
- type FileRange
- func (r *FileRange) EarlierThan(needle FileRange) bool
- func (r *FileRange) EarlierThanB(bn base.Blknum) bool
- func (r *FileRange) Equals(needle FileRange) bool
- func (r *FileRange) Follows(needle FileRange, sequential bool) bool
- func (r *FileRange) Intersects(needle FileRange) bool
- func (r *FileRange) IntersectsB(bn base.Blknum) bool
- func (r *FileRange) LaterThan(needle FileRange) bool
- func (r *FileRange) LaterThanB(bn base.Blknum) bool
- func (r *FileRange) Overlaps(test FileRange) (rd RangeDiff)
- func (r *FileRange) Precedes(needle FileRange, sequential bool) bool
- func (r *FileRange) RangeToFilename(chain string) string
- func (r *FileRange) Span() base.Blknum
- func (r FileRange) String() string
- type RangeDiff
- type RecordRange
- type TimestampRange
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BlockRange ¶
type BlockRange FileRange // sugar
type FileRange ¶
func RangeFromFilename ¶
RangeFromFilename returns a FileRange and ignore any errors
func RangeFromFilenameE ¶
RangeFromFilenameE returns a block range given a chunk filename. The format of filenames may be start-end.bin (start and end are nine digit and zero-padded to the left) or start.txt
func RangeFromRangeString ¶
RangeFromRangeString returns a file range from a string
func (*FileRange) EarlierThan ¶
EarlierThan returns true if range is strictly before the given needle range
func (*FileRange) EarlierThanB ¶
EarlierThanB returns true if the range is strictly before the given block
func (*FileRange) Follows ¶
Follows returns true if the range is strictly after the needle range. (If 'sequential' is true, then the first block in the range must be one more than the last block in the needle range.)
func (*FileRange) Intersects ¶
Intersects returns true if the two ranges intersect
func (*FileRange) IntersectsB ¶
IntersectsB returns true if the block is inside the range (inclusive on both ends)
func (*FileRange) LaterThan ¶
LaterThan returns true if range is strictly after the given needle range
func (*FileRange) LaterThanB ¶
LaterThanB returns true if the range is strictly after the given block
func (*FileRange) Precedes ¶
Precedes returns true if the range is strictly before the needle range. (If 'sequential' is true, then the last block in the range must be one less than the first block in the needle range.) If the needle range starts at zero, returns false (nothing is before the first range)
func (*FileRange) RangeToFilename ¶
RangeToFilename returns a fileName and existence bool given a file range and a type