Documentation ¶
Index ¶
- type LeveldbStorage
- func (s *LeveldbStorage) Close() error
- func (s *LeveldbStorage) Delete(key []byte) error
- func (s *LeveldbStorage) Get(key []byte) ([]byte, bool)
- func (s *LeveldbStorage) GetCount() int64
- func (s *LeveldbStorage) Has(key []byte) bool
- func (s *LeveldbStorage) ReOpen()
- func (s *LeveldbStorage) Set(key []byte, value []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LeveldbStorage ¶
type LeveldbStorage struct {
// contains filtered or unexported fields
}
LeveldbStorage TODO 要支持事务
func NewStorage ¶
func NewStorage(path string, timeout int64) (*LeveldbStorage, error)
NewStorage 打开数据库
func (*LeveldbStorage) GetCount ¶
func (s *LeveldbStorage) GetCount() int64
func (*LeveldbStorage) Has ¶
func (s *LeveldbStorage) Has(key []byte) bool
func (*LeveldbStorage) ReOpen ¶
func (s *LeveldbStorage) ReOpen()
func (*LeveldbStorage) Set ¶
func (s *LeveldbStorage) Set(key []byte, value []byte)
Click to show internal directories.
Click to hide internal directories.