Documentation ¶
Index ¶
- Constants
- type CachedValue
- type RabbitStore
- func (rabbit RabbitStore) ActiveCount() int
- func (rabbit RabbitStore) Close(writeBack bool)
- func (rabbit RabbitStore) Delete(key []byte)
- func (rabbit RabbitStore) Get(key []byte) []byte
- func (rabbit RabbitStore) GetObj(key []byte, ptr *types.Serializable)
- func (rabbit RabbitStore) GetReadOnlyObj(key []byte, ptr *types.Serializable)
- func (rabbit RabbitStore) GetShortKeyPath(key []byte) (path [][KeySize]byte, ok bool)
- func (rabbit RabbitStore) Has(key []byte) bool
- func (rabbit RabbitStore) Iterator(start, end []byte) types.ObjIterator
- func (rabbit RabbitStore) ReverseIterator(start, end []byte) types.ObjIterator
- func (rabbit RabbitStore) ScanAllShortKeys(fn func(key [KeySize]byte) bool)
- func (rabbit RabbitStore) Set(key []byte, bz []byte)
- func (rabbit RabbitStore) SetObj(key []byte, obj types.Serializable)
- type SimpleCacheStore
- func (scs *SimpleCacheStore) GetValue(key [KeySize]byte) (value *CachedValue, status types.CacheStatus)
- func (scs *SimpleCacheStore) ScanAllEntries(fn func(key, value []byte, isDeleted bool))
- func (scs *SimpleCacheStore) ScanAllShortKeys(fn func(key [KeySize]byte) bool)
- func (scs *SimpleCacheStore) SetValue(key [KeySize]byte, value *CachedValue)
- type SimpleMultiStore
Constants ¶
View Source
const ( KeySize = 8 // 2 for fuzz, 8 for production NotFount = 0 EmptySlot = 1 Exists = 2 MaxFindDepth = 100 )
View Source
const ( EmptyMarkerIndex = 0 PassbyNumIndex = 1 KeyLenStart = PassbyNumIndex + 8 KeyStart = KeyLenStart + 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedValue ¶
type CachedValue struct {
// contains filtered or unexported fields
}
func BytesToCachedValue ¶
func BytesToCachedValue(buf []byte) *CachedValue
func (*CachedValue) GetValue ¶
func (v *CachedValue) GetValue() []byte
func (*CachedValue) IsEmpty ¶
func (v *CachedValue) IsEmpty() bool
func (*CachedValue) SetValue ¶
func (v *CachedValue) SetValue(obj interface{})
func (*CachedValue) ToBytes ¶
func (v *CachedValue) ToBytes() []byte
type RabbitStore ¶
type RabbitStore struct {
// contains filtered or unexported fields
}
func NewRabbitStore ¶
func NewRabbitStore(trunk *store.TrunkStore) (rabbit RabbitStore)
func (RabbitStore) ActiveCount ¶
func (rabbit RabbitStore) ActiveCount() int
func (RabbitStore) Close ¶
func (rabbit RabbitStore) Close(writeBack bool)
func (RabbitStore) Delete ¶
func (rabbit RabbitStore) Delete(key []byte)
func (RabbitStore) Get ¶
func (rabbit RabbitStore) Get(key []byte) []byte
func (RabbitStore) GetObj ¶
func (rabbit RabbitStore) GetObj(key []byte, ptr *types.Serializable)
func (RabbitStore) GetReadOnlyObj ¶
func (rabbit RabbitStore) GetReadOnlyObj(key []byte, ptr *types.Serializable)
func (RabbitStore) GetShortKeyPath ¶
func (rabbit RabbitStore) GetShortKeyPath(key []byte) (path [][KeySize]byte, ok bool)
func (RabbitStore) Has ¶
func (rabbit RabbitStore) Has(key []byte) bool
func (RabbitStore) Iterator ¶
func (rabbit RabbitStore) Iterator(start, end []byte) types.ObjIterator
func (RabbitStore) ReverseIterator ¶
func (rabbit RabbitStore) ReverseIterator(start, end []byte) types.ObjIterator
func (RabbitStore) ScanAllShortKeys ¶
func (rabbit RabbitStore) ScanAllShortKeys(fn func(key [KeySize]byte) bool)
func (RabbitStore) Set ¶
func (rabbit RabbitStore) Set(key []byte, bz []byte)
func (RabbitStore) SetObj ¶
func (rabbit RabbitStore) SetObj(key []byte, obj types.Serializable)
type SimpleCacheStore ¶
type SimpleCacheStore struct {
// contains filtered or unexported fields
}
func NewSimpleCacheStore ¶
func NewSimpleCacheStore() *SimpleCacheStore
func (*SimpleCacheStore) GetValue ¶
func (scs *SimpleCacheStore) GetValue(key [KeySize]byte) (value *CachedValue, status types.CacheStatus)
func (*SimpleCacheStore) ScanAllEntries ¶
func (scs *SimpleCacheStore) ScanAllEntries(fn func(key, value []byte, isDeleted bool))
func (*SimpleCacheStore) ScanAllShortKeys ¶
func (scs *SimpleCacheStore) ScanAllShortKeys(fn func(key [KeySize]byte) bool)
func (*SimpleCacheStore) SetValue ¶
func (scs *SimpleCacheStore) SetValue(key [KeySize]byte, value *CachedValue)
type SimpleMultiStore ¶
type SimpleMultiStore struct {
// contains filtered or unexported fields
}
We use a new TrunkStore for transaction
func (*SimpleMultiStore) Close ¶
func (sms *SimpleMultiStore) Close(writeBack bool)
func (*SimpleMultiStore) GetCachedValue ¶
func (sms *SimpleMultiStore) GetCachedValue(key [KeySize]byte) *CachedValue
func (*SimpleMultiStore) MustGetCachedValue ¶
func (sms *SimpleMultiStore) MustGetCachedValue(key [KeySize]byte) *CachedValue
func (*SimpleMultiStore) SetCachedValue ¶
func (sms *SimpleMultiStore) SetCachedValue(key [KeySize]byte, cv *CachedValue)
Click to show internal directories.
Click to hide internal directories.