storage

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

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) Close

func (s *LeveldbStorage) Close() error

Close 关闭

func (*LeveldbStorage) Delete

func (s *LeveldbStorage) Delete(key []byte) error

Delete 删除

func (*LeveldbStorage) Get

func (s *LeveldbStorage) Get(key []byte) ([]byte, bool)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL