-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnode.go
41 lines (38 loc) · 899 Bytes
/
node.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package adaptive
type Node[T any] interface {
getId() uint64
setId(uint64)
getPartialLen() uint32
setPartialLen(uint32)
getArtNodeType() nodeType
getNumChildren() uint8
setNumChildren(uint8)
getPartial() []byte
setPartial([]byte)
isLeaf() bool
matchPrefix([]byte) bool
getChild(int) Node[T]
setChild(int, Node[T])
clone(bool) Node[T]
setMutateCh(chan struct{})
getKey() []byte
getValue() T
setValue(T)
setKey([]byte)
getKeyLen() uint32
setKeyLen(uint32)
getKeyAtIdx(int) byte
setKeyAtIdx(int, byte)
getChildren() []Node[T]
getKeys() []byte
getMutateCh() chan struct{}
getLowerBoundCh(byte) int
getNodeLeaf() *NodeLeaf[T]
setNodeLeaf(*NodeLeaf[T])
Iterator() *Iterator[T]
LowerBoundIterator() *LowerBoundIterator[T]
PathIterator([]byte) *PathIterator[T]
ReverseIterator() *ReverseIterator[T]
}