Documentation
¶
Index ¶
- Constants
- Variables
- func AppendKeys(keys art.Tree, items []Item)
- func Consume(items []Item, offset int64) (int64, int64, error)
- func Get(items []Item, offset int64) (int64, error)
- func KeyHash(key []byte) uint64
- func KeyHashEncoded(h uint64) []byte
- func Keys(keys art.Tree, keyHash []byte) ([]int64, error)
- func Stat(path string, offset int64, opts Params) (int64, int, error)
- func Time(items []Item, ts int64) (int64, error)
- func Write(path string, offset int64, newVersion Version, opts Params, index []Item) (retErr error)
- type Item
- type Params
- type Version
- type Writer
Constants ¶
View Source
const HeaderSize = int64(len(magic) + 2) // magic + version + params
Variables ¶
View Source
var ( VUnknown = Version{} V1 = Version{/* contains filtered or unexported fields */} V2 = Version{/* contains filtered or unexported fields */} VLast Version = V2 // always last version )
View Source
var (
ErrCorrupted = errors.New("index corrupted")
)
View Source
var ErrKeyNotFound = fmt.Errorf("key: %w", message.ErrNotFound)
View Source
var ErrOffsetAfterEnd = fmt.Errorf("%w: offset after end", message.ErrInvalidOffset)
View Source
var ErrOffsetBeforeStart = fmt.Errorf("%w: offset before start", message.ErrNotFound)
View Source
var ErrOffsetIndexEmpty = fmt.Errorf("%w: no offset items", message.ErrInvalidOffset)
View Source
var ErrOffsetNotFound = fmt.Errorf("%w: offset not found", message.ErrNotFound)
View Source
var ErrTimeAfterEnd = errors.New("time after end")
View Source
var ErrTimeBeforeStart = errors.New("time before start")
View Source
var ErrTimeIndexEmpty = fmt.Errorf("%w: no time items", message.ErrInvalidOffset)
Functions ¶
func AppendKeys ¶
func KeyHashEncoded ¶
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func OpenWriter ¶
func (*Writer) SyncAndClose ¶
Click to show internal directories.
Click to hide internal directories.