Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDBClosed = errors.New("database is already closed") ErrFileTooBig = errors.New("file size is too big (max 4Gb)") ErrInvalidKey = errors.New("key is not valid") ErrKeyNotFound = errors.New("key was not found in database") ErrNoSpace = errors.New("no space left in database") // What you usually want to do here is create a new file ErrCorrupted = errors.New("database seems corrupted") )
Define public errors
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
RootPath string
// contains filtered or unexported fields
}
DB is a kvimd database. It uses uint32 in a lot of places so this means: each hashmap file is max 4Gb; you can store max 4Gb*4Gb/workers values (a lot)
func (*DB) Close ¶
Close the database, flushing all pending operations to disk. It is not safe to call any Read or Write after a Close
Click to show internal directories.
Click to hide internal directories.