sbucket

package
v0.0.0-...-14c04b0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2018 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSBucketOnStat = errors.New("Error while getting leveldb stats")
View Source
var ErrSBucketOpeningError = errors.New("Error while creating leveldb instance")

Functions

This section is empty.

Types

type KeyStat

type KeyStat struct {
	BaseKey         []byte
	ApproximateSize int64
}

type List

type List []KeyStat

type SBucket

type SBucket struct {
	DBPath string
	Opt    *opt.Options
	DB     *leveldb.DB
}

func New

func New(DBPath string, opt *opt.Options) *SBucket

func (SBucket) Close

func (sb SBucket) Close() error

func (SBucket) CreateFileReader

func (sb SBucket) CreateFileReader()

func (SBucket) CreateFileWriter

func (sb SBucket) CreateFileWriter()

func (SBucket) Exists

func (sb SBucket) Exists(key []byte) (bool, error)

func (SBucket) Flush

func (sb SBucket) Flush() error

func (SBucket) List

func (sb SBucket) List() (*List, error)

func (SBucket) Open

func (sb SBucket) Open() (err error)

func (SBucket) Read

func (sb SBucket) Read() ([]byte, error)

func (SBucket) Stat

func (sb SBucket) Stat() (*Stats, error)
func (sb SBucket) Unlink(key []byte) error

func (SBucket) WriteFile

func (sb SBucket) WriteFile()

type Stats

type Stats struct {
	UsedSpace int64
	FreeSpace int64
}

Jump to

Keyboard shortcuts

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