Documentation ¶
Index ¶
- func NewlruDB(size uint32) (*lruDB, error)
- type DB
- func (s *DB) Close() error
- func (s *DB) Destroy() error
- func (s *DB) DestroyClosed() error
- func (s *DB) Get(key []byte) ([]byte, error)
- func (s *DB) Has(key []byte) error
- func (s *DB) Init() error
- func (s *DB) IsInterfaceNil() bool
- func (s *DB) Put(key, val []byte) error
- func (s *DB) Remove(key []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB represents the memory database storage. It holds a map of key value pairs and a mutex to handle concurrent accesses to the map
func (*DB) DestroyClosed ¶
DestroyClosed removes the storage medium stored data
func (*DB) Has ¶
Has returns true if the given key is present in the persistence medium, false otherwise
func (*DB) IsInterfaceNil ¶
IsInterfaceNil returns true if there is no value under the interface
Click to show internal directories.
Click to hide internal directories.