Documentation ¶
Overview ¶
Package raphanus - simple implementation of in-memory cache
Index ¶
- type DB
- func (db *DB) DecrInt(key string) (err error)
- func (db *DB) GetBytes(key string) ([]byte, error)
- func (db *DB) GetDict(key string) (value raphanuscommon.DictValue, err error)
- func (db *DB) GetDictItem(key string, dictKey string) (string, error)
- func (db *DB) GetInt(key string) (int64, error)
- func (db *DB) GetList(key string) (value raphanuscommon.ListValue, err error)
- func (db *DB) GetListItem(key string, index int) (string, error)
- func (db *DB) GetStr(key string) (string, error)
- func (db *DB) IncrInt(key string) (err error)
- func (db *DB) Keys() []string
- func (db *DB) Len() int
- func (db *DB) Remove(key string) (err error)
- func (db *DB) RemoveDictItem(key, dictKey string) error
- func (db *DB) SetBytes(key string, value []byte, ttl int) error
- func (db *DB) SetDict(key string, value raphanuscommon.DictValue, ttl int) error
- func (db *DB) SetDictItem(key, dictKey, dictValue string) error
- func (db *DB) SetInt(key string, value int64, ttl int) error
- func (db *DB) SetList(key string, value raphanuscommon.ListValue, ttl int) error
- func (db *DB) SetListItem(key string, index int, value string) error
- func (db *DB) SetStorage(fsStorageName string, fsStorageSyncTime int) DB
- func (db *DB) SetStr(key, value string, ttl int) error
- func (db *DB) UnderLock(fn func())
- func (db *DB) UpdateBytes(key string, value []byte) (err error)
- func (db *DB) UpdateDict(key string, value raphanuscommon.DictValue) (err error)
- func (db *DB) UpdateInt(key string, value int64) (err error)
- func (db *DB) UpdateList(key string, value raphanuscommon.ListValue) (err error)
- func (db *DB) UpdateStr(key, value string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
DB - in-memory cache object
func (*DB) GetDictItem ¶
GetDictItem - get item from dict value by exists key
func (*DB) GetListItem ¶
GetListItem - get one item from list value by key
func (*DB) RemoveDictItem ¶
RemoveDictItem - remove item on dict value by exists key
func (*DB) SetDictItem ¶
SetDictItem - set item on dict value by exists key
func (*DB) SetListItem ¶
SetListItem - set one item of list value by key
func (*DB) SetStorage ¶
SetStorage - setup persistent storage
func (*DB) UnderLock ¶
func (db *DB) UnderLock(fn func())
UnderLock - execute few RW-methods under one Lock
func (*DB) UpdateBytes ¶
UpdateBytes - update []byte value by exists key
func (*DB) UpdateDict ¶
UpdateDict - update dict value by exists key
func (*DB) UpdateList ¶
UpdateList - update list value by exists key
Source Files ¶
Click to show internal directories.
Click to hide internal directories.