Documentation ¶
Index ¶
- Constants
- Variables
- type Bitcask
- func (b *Bitcask) Close() error
- func (b *Bitcask) Del(key string) error
- func (b *Bitcask) Get(key string) ([]byte, error)
- func (b *Bitcask) Has(key string) bool
- func (b *Bitcask) Keys() chan string
- func (b *Bitcask) Len() int64
- func (b *Bitcask) Set(key string, value []byte) error
- func (b *Bitcask) Sync() error
- type Bucket
- type Item
- type Keydir
- type Options
- type Record
- type Stats
Constants ¶
View Source
const ( LOGFILE string = "test.log" DATA_FILE string = "%09d.data" )
View Source
const (
RECORD_HEADER_SIZE int32 = 20
)
Variables ¶
View Source
var ErrKeyNotFound = errors.New("Key not found")
View Source
var Lg *log.Logger
Functions ¶
This section is empty.
Types ¶
type Bitcask ¶
func NewBitcask ¶
NewBitcask creates directory(path), and scans directory to build keydir
type Bucket ¶
type Bucket struct {
// contains filtered or unexported fields
}
File wraps *os.File with read and write records, compression, buf
type Keydir ¶
Keydir is a index data structure for bitcask It wrap for hashmap(builtin go) It is safe to call add, remove, get concurrently.
Click to show internal directories.
Click to hide internal directories.