Versions in this module Expand all Collapse all v0 v0.0.1 Jan 1, 2024 Changes in this version + const FT_COLOR + const FV_COLOR_BLACK + const FV_COLOR_RED + var ErrInvalidKeySize = errors.New("invalid key size") + var ErrInvalidPointer = errors.New("invalid pointer") + var ErrKeyAlreadyExists = errors.New("key already exists") + var ErrNilPtr = errors.New("nil pointer") + var ErrNodeFetch = errors.New("failed to fetch node") + var ErrNotFound = errors.New("not found") + type DummyVal struct + func (v *DummyVal) Copy() EntryItem + func (v *DummyVal) IsNil() bool + func (v *DummyVal) MarshalBinary() ([]byte, error) + func (v *DummyVal) New() EntryItem + func (v *DummyVal) Size() int + func (v *DummyVal) UnmarshalBinary([]byte) error + type Entry struct + Key K + Val V + func (e *Entry[K, V]) Copy() *Entry[K, V] + func (e *Entry[K, V]) MarshalBinary() ([]byte, error) + func (e *Entry[K, V]) Size() int + func (e *Entry[K, V]) UnmarshalBinary(d []byte) error + type EntryItem interface + Copy func() EntryItem + IsNil func() bool + New func() EntryItem + Size func() int + type Options struct + PageSize uint16 + type RBTree struct + func Open[K, V EntryItem](fileName string, opts *Options) (*RBTree[K, V], error) + func (tree *RBTree[K, V]) Close() error + func (tree *RBTree[K, V]) Count() int + func (tree *RBTree[K, V]) Delete(key K) error + func (tree *RBTree[K, V]) DeleteMem(key K) error + func (tree *RBTree[K, V]) Get(key K) (*Entry[K, V], error) + func (tree *RBTree[K, V]) Insert(e *Entry[K, V]) error + func (tree *RBTree[K, V]) InsertMem(e *Entry[K, V]) error + func (tree *RBTree[K, V]) Print(count int) error + func (tree *RBTree[K, V]) Remove() + func (tree *RBTree[K, V]) Scan(key K, scanFn func(key K, val V) (bool, error)) error + func (tree *RBTree[K, V]) WriteAll() error