Versions in this module Expand all Collapse all v0 v0.2.0 Dec 1, 2020 Changes in this version + const ItemBytes + const ItemInt64 + const ItemInterface + func HashKey(key []byte) uint64 + type Cell struct + LimitCount int + LimitSize int64 + func NewCell() *Cell + func (this *Cell) Delete(hashKey uint64) + func (this *Cell) Increase64(key []byte, expireAt int64, hashKey uint64, delta int64) (result int64) + func (this *Cell) Range(f func(item *Item)) + func (this *Cell) Read(hashKey uint64) *Item + func (this *Cell) Recycle() + func (this *Cell) Reset() + func (this *Cell) Stat() *CellStat + func (this *Cell) Trim() + func (this *Cell) Write(hashKey uint64, item *Item) + type CellStat struct + CountItems int + TotalBytes int64 + type CompressOpt struct + Level int + func NewCompressOpt(level int) *CompressOpt + type Grid struct + func NewGrid(countCells int, opt ...interface{}) *Grid + func (this *Grid) Cells() []*Cell + func (this *Grid) Delete(key []byte) + func (this *Grid) Destroy() + func (this *Grid) IncreaseInt64(key []byte, delta int64, lifeSeconds int64) (result int64) + func (this *Grid) Read(key []byte) *Item + func (this *Grid) Reset() + func (this *Grid) Stat() *Stat + func (this *Grid) WriteBytes(key []byte, value []byte, lifeSeconds int64) + func (this *Grid) WriteInt64(key []byte, value int64, lifeSeconds int64) + func (this *Grid) WriteInterface(key []byte, value interface{}, lifeSeconds int64) + func (this *Grid) WriteItem(item *Item) + func (this *Grid) WriteString(key []byte, value string, lifeSeconds int64) + type Item struct + ExpireAt int64 + IsCompressed bool + Key []byte + Next *Item + Prev *Item + Type ItemType + ValueBytes []byte + ValueInt64 int64 + ValueInterface interface{} + func NewItem(key []byte, dataType ItemType) *Item + func (this *Item) Bytes() []byte + func (this *Item) HashKey() uint64 + func (this *Item) IncreaseInt64(delta int64) + func (this *Item) Size() int64 + func (this *Item) String() string + type ItemType = int8 + type LimitCountOpt struct + Count int + func NewLimitCountOpt(count int) *LimitCountOpt + type LimitSizeOpt struct + Size int64 + func NewLimitSizeOpt(size int64) *LimitSizeOpt + type List struct + func NewList() *List + func (this *List) Add(item *Item) + func (this *List) Len() int + func (this *List) Range(f func(item *Item) (goNext bool)) + func (this *List) Remove(item *Item) + func (this *List) Reset() + type RecycleIntervalOpt struct + Interval int + func NewRecycleIntervalOpt(interval int) *RecycleIntervalOpt + type Stat struct + CountItems int + TotalBytes int64