Documentation ¶
Index ¶
- type Collection
- type Iterable
- type Iterator
- type Node
- type RedBlackTree
- func (rbt *RedBlackTree[K, V]) Clear()
- func (rbt *RedBlackTree[K, V]) Delete(key K)
- func (rbt *RedBlackTree[K, V]) Get(key K) (V, bool)
- func (rbt *RedBlackTree[K, V]) Keys() <-chan K
- func (rbt *RedBlackTree[K, V]) Put(key K, val V)
- func (rbt *RedBlackTree[K, V]) Restore(entry wal.LogEntry)
- func (rbt *RedBlackTree[K, V]) Size() uint
- func (rbt *RedBlackTree[K, V]) Values() <-chan V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection[K any, V any] interface { Iterable[K, V] Get(K) (V, bool) // Get value from key Put(K, V) // Insert node Delete(K) // Insert node with DELETE marker Clear() Size() uint }
A key-value balanced tree data structure
type RedBlackTree ¶
func (*RedBlackTree[K, V]) Clear ¶
func (rbt *RedBlackTree[K, V]) Clear()
func (*RedBlackTree[K, V]) Delete ¶
func (rbt *RedBlackTree[K, V]) Delete(key K)
func (*RedBlackTree[K, V]) Get ¶
func (rbt *RedBlackTree[K, V]) Get(key K) (V, bool)
func (*RedBlackTree[K, V]) Keys ¶
func (rbt *RedBlackTree[K, V]) Keys() <-chan K
func (*RedBlackTree[K, V]) Put ¶
func (rbt *RedBlackTree[K, V]) Put(key K, val V)
Insert or update value at key
func (*RedBlackTree[K, V]) Restore ¶
func (rbt *RedBlackTree[K, V]) Restore(entry wal.LogEntry)
func (*RedBlackTree[K, V]) Size ¶
func (rbt *RedBlackTree[K, V]) Size() uint
func (*RedBlackTree[K, V]) Values ¶
func (rbt *RedBlackTree[K, V]) Values() <-chan V
Click to show internal directories.
Click to hide internal directories.