Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigureMemPool(maxConcurrency *int)
- func DirSize(path string) (int64, error)
- func Exists(path string) bool
- func FullVersion() string
- func GetDatafiles(path string) ([]string, error)
- func NewEntry(key string, value []byte) pb.Entry
- func ParseIds(fns []string) ([]int, error)
- type Datafile
- func (df *Datafile) Close() error
- func (df *Datafile) FileID() int
- func (df *Datafile) Name() string
- func (df *Datafile) Read() (e pb.Entry, n int64, err error)
- func (df *Datafile) ReadAt(index, size int64) (e pb.Entry, err error)
- func (df *Datafile) Size() int64
- func (df *Datafile) Sync() error
- func (df *Datafile) Write(e pb.Entry) (int64, int64, error)
- type Item
- type Keydir
- func (k *Keydir) Add(key string, fileid int, offset, size int64) Item
- func (k *Keydir) Bytes() ([]byte, error)
- func (k *Keydir) Delete(key string)
- func (k *Keydir) Get(key string) (Item, bool)
- func (k *Keydir) Keys() chan string
- func (k *Keydir) Len() int
- func (k *Keydir) Load(fn string) error
- func (k *Keydir) Save(fn string) error
Constants ¶
View Source
const (
DefaultDatafileFilename = "%09d.data"
)
Variables ¶
View Source
var ( ErrReadonly = errors.New("error: read only datafile") ErrReadError = errors.New("error: read error") )
View Source
var ( // Version release version Version = "0.0.1" // Commit will be overwritten automatically by the build system Commit = "HEAD" )
Functions ¶
func ConfigureMemPool ¶ added in v0.3.1
func ConfigureMemPool(maxConcurrency *int)
ConfigureMemPool configurate the mempool accordingly
func GetDatafiles ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.