Documentation ¶
Overview ¶
Package index implements index operations.
Index is linear list of pairs (k, v), where len(v) = const, and ki = i, that defines Get and Set operations that has complexity of O(1).
Index is represented by:
N - max(i) Vlen - len(v) = const Blob - {v0, v1, ..., vi, ... vN}
Vi is ReadAt(buf[:Vlen], Vlen*i) on Blob.
Index ¶
Constants ¶
View Source
const StartID int64 = 0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index interface { io.Closer Get(k int64, b []byte) error Set(k int64, v []byte) error Len() (int64, error) }
Index is k-v database, where len(v) = const and k is {1, 2, 3, ..., n}, which is mapped to file.
Click to show internal directories.
Click to hide internal directories.