heleveldb

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DriverModeKeySuffixAsc = iota
	DriverModeKeySuffixDesc
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func NewLevelDBDriver

func NewLevelDBDriver(config *DriverConfig) (*Driver, error)

func (*Driver) Close

func (d *Driver) Close() error

func (*Driver) Delete

func (d *Driver) Delete(atHeight int64, key []byte) error

func (*Driver) DeleteSync

func (d *Driver) DeleteSync(atHeight int64, key []byte) error

func (*Driver) Get

func (d *Driver) Get(maxHeight int64, key []byte) ([]byte, error)

func (*Driver) Has

func (d *Driver) Has(maxHeight int64, key []byte) (bool, error)

func (*Driver) Iterator

func (d *Driver) Iterator(maxHeight int64, start, end []byte) (hld.HeightLimitEnabledIterator, error)

func (*Driver) NewBatch

func (d *Driver) NewBatch(atHeight int64) hld.HeightLimitEnabledBatch

func (*Driver) Print

func (d *Driver) Print() error

TODO: Implement me

func (*Driver) ReverseIterator

func (d *Driver) ReverseIterator(maxHeight int64, start, end []byte) (hld.HeightLimitEnabledIterator, error)

func (*Driver) Set

func (d *Driver) Set(atHeight int64, key, value []byte) error

func (*Driver) SetSync

func (d *Driver) SetSync(atHeight int64, key, value []byte) error

func (*Driver) Stats

func (d *Driver) Stats() map[string]string

type DriverConfig

type DriverConfig struct {
	Name string
	Dir  string
	Mode int
}

type Iterator

type Iterator struct {
	tmdb.Iterator
	// contains filtered or unexported fields
}

func NewLevelDBIterator

func NewLevelDBIterator(d *Driver, maxHeight int64, start, end []byte) (*Iterator, error)

func NewLevelDBReverseIterator

func NewLevelDBReverseIterator(d *Driver, maxHeight int64, start, end []byte) (*Iterator, error)

func (*Iterator) Domain

func (i *Iterator) Domain() (start []byte, end []byte)

func (*Iterator) Valid

func (i *Iterator) Valid() bool

func (*Iterator) Value

func (i *Iterator) Value() (value []byte)

type LevelBatch

type LevelBatch struct {
	// contains filtered or unexported fields
}

func NewLevelDBBatch

func NewLevelDBBatch(atHeight int64, driver *Driver) *LevelBatch

func (*LevelBatch) Close

func (b *LevelBatch) Close() error

func (*LevelBatch) Delete

func (b *LevelBatch) Delete(key []byte) error

func (*LevelBatch) Metric

func (b *LevelBatch) Metric()

func (*LevelBatch) RollbackBatch

func (b *LevelBatch) RollbackBatch() tmdb.Batch

func (*LevelBatch) Set

func (b *LevelBatch) Set(key, value []byte) error

func (*LevelBatch) Write

func (b *LevelBatch) Write() error

func (*LevelBatch) WriteSync

func (b *LevelBatch) WriteSync() error

Jump to

Keyboard shortcuts

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