skip_list

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDataNotExist = errors.New("data does not exist")
)

Functions

This section is empty.

Types

type DefaultSkipListImpl

type DefaultSkipListImpl struct {
	Lenth int64
	// contains filtered or unexported fields
}

func NewDefaultSkipListImpl

func NewDefaultSkipListImpl() (*DefaultSkipListImpl, error)

func (*DefaultSkipListImpl) Del

func (d *DefaultSkipListImpl) Del(key []byte) error

func (*DefaultSkipListImpl) Get

func (d *DefaultSkipListImpl) Get(key []byte) ([]byte, bool, error)

func (*DefaultSkipListImpl) GetIter

func (d *DefaultSkipListImpl) GetIter() Iter

TODO(EAHITechnology) iter checkpoint

func (*DefaultSkipListImpl) Len

func (d *DefaultSkipListImpl) Len() int64

func (*DefaultSkipListImpl) Put

func (d *DefaultSkipListImpl) Put(key, value []byte) error

type DefaultSkipListIterImpl

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

func (*DefaultSkipListIterImpl) Close

func (d *DefaultSkipListIterImpl) Close()

func (*DefaultSkipListIterImpl) Get

func (d *DefaultSkipListIterImpl) Get() ([]byte, error)

func (*DefaultSkipListIterImpl) HasNext

func (d *DefaultSkipListIterImpl) HasNext() bool

func (*DefaultSkipListIterImpl) Next

func (d *DefaultSkipListIterImpl) Next() ([]byte, error)

func (*DefaultSkipListIterImpl) Seek

func (d *DefaultSkipListIterImpl) Seek(key []byte) error

type DefaultSkipListNode

type DefaultSkipListNode struct {
	Key   []byte
	Value []byte
	// contains filtered or unexported fields
}

func NewDefaultSkipListNode

func NewDefaultSkipListNode(key, Value []byte, level int) *DefaultSkipListNode

type Iter

type Iter interface {
	Seek(key []byte) error
	Get() ([]byte, error)
	Next() ([]byte, error)
	HasNext() bool
	Close()
}

type SkipList

type SkipList interface {
	Get(key []byte) ([]byte, bool, error)
	Put(key, value []byte) error
	Del(key []byte) error
	Len() int64
	GetIter() Iter
}

func NewSkipList

func NewSkipList(config SkipListConf) (SkipList, error)

type SkipListConf

type SkipListConf struct {
	Typ string
}

Jump to

Keyboard shortcuts

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