Documentation ¶
Index ¶
- Constants
- Variables
- func Encode(t *Table) ([]byte, error)
- type Pack
- type State
- type Stats
- type Table
- func (t *Table) Check(hkey uint64) bool
- func (t *Table) Coefficient() uint64
- func (t *Table) Delete(hkey uint64) error
- func (t *Table) Get(hkey uint64) (storage.Entry, error)
- func (t *Table) GetKey(hkey uint64) (string, error)
- func (t *Table) GetLastAccess(hkey uint64) (int64, error)
- func (t *Table) GetRaw(hkey uint64) ([]byte, error)
- func (t *Table) GetRawKey(hkey uint64) ([]byte, error)
- func (t *Table) GetTTL(hkey uint64) (int64, error)
- func (t *Table) Put(hkey uint64, value storage.Entry) error
- func (t *Table) PutRaw(hkey uint64, value []byte) error
- func (t *Table) Range(f func(hkey uint64, e storage.Entry) bool)
- func (t *Table) RangeHKey(f func(hkey uint64) bool)
- func (t *Table) Reset()
- func (t *Table) Scan(cursor uint64, count int, f func(e storage.Entry) bool) (uint64, error)
- func (t *Table) ScanRegexMatch(cursor uint64, expr string, count int, f func(e storage.Entry) bool) (uint64, error)
- func (t *Table) SetCoefficient(cf uint64)
- func (t *Table) SetState(s State)
- func (t *Table) State() State
- func (t *Table) Stats() Stats
- func (t *Table) UpdateTTL(hkey uint64, value storage.Entry) error
Constants ¶
View Source
const ( MaxKeyLength = 256 MetadataLength = 29 )
View Source
const ( ReadWriteState = State(iota + 1) ReadOnlyState RecycledState )
Variables ¶
View Source
var ( ErrNotEnoughSpace = errors.New("not enough space") ErrHKeyNotFound = errors.New("hkey not found") )
Functions ¶
Types ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) Coefficient ¶
func (*Table) Put ¶
In-memory layout for entry:
KEY-LENGTH(uint8) | KEY(bytes) | TTL(uint64) | TIMESTAMP(uint64) | LASTACCESS(uint64) | VALUE-LENGTH(uint64) | VALUE(bytes)
func (*Table) ScanRegexMatch ¶
func (*Table) SetCoefficient ¶
Click to show internal directories.
Click to hide internal directories.