Documentation ¶
Overview ¶
Package btree is a generated protocol buffer package.
It is generated from these files:
metadata.proto
It has these top-level messages:
BtreeMetadata TreeNode TreeLog
Index ¶
- Constants
- type Btree
- func (t *Btree) Delete(key []byte) error
- func (t *Btree) Insert(key, value []byte) error
- func (t *Btree) Marshal(filename string) error
- func (t *Btree) PrintInfo()
- func (t *Btree) PrintTree()
- func (t *Btree) Search(key []byte) ([]byte, error)
- func (t *Btree) Sync(file string)
- func (t *Btree) Update(key, value []byte) error
- type BtreeMetadata
- func (m *BtreeMetadata) GetIndex() int64
- func (m *BtreeMetadata) GetIndexCursor() int64
- func (m *BtreeMetadata) GetLeafMax() int64
- func (m *BtreeMetadata) GetNodeMax() int64
- func (m *BtreeMetadata) GetNodes() [][]byte
- func (m *BtreeMetadata) GetRoot() int64
- func (m *BtreeMetadata) GetSize() int64
- func (*BtreeMetadata) ProtoMessage()
- func (m *BtreeMetadata) Reset()
- func (m *BtreeMetadata) String() string
- type TreeLog
- type TreeNode
- func (m *TreeNode) GetChildrens() []int64
- func (m *TreeNode) GetId() int64
- func (m *TreeNode) GetIsDirt() int32
- func (m *TreeNode) GetKeys() [][]byte
- func (m *TreeNode) GetNodeType() int32
- func (m *TreeNode) GetValues() [][]byte
- func (*TreeNode) ProtoMessage()
- func (m *TreeNode) Reset()
- func (m *TreeNode) String() string
Constants ¶
View Source
const ( // TreeSize is tree size TreeSize = 1 << 10 // LeafSize is leaf size LeafSize = 1 << 5 // NodeSize is node size NodeSize = 1 << 6 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Btree ¶
type Btree struct { BtreeMetadata // contains filtered or unexported fields }
Btree metadata
func NewBtreeSize ¶
NewBtreeSize create new btree with custom leafsize/nodesize
type BtreeMetadata ¶
type BtreeMetadata struct { Root *int64 `protobuf:"varint,1,opt,name=root" json:"root,omitempty"` Size *int64 `protobuf:"varint,3,opt,name=size" json:"size,omitempty"` LeafMax *int64 `protobuf:"varint,4,opt,name=leaf_max" json:"leaf_max,omitempty"` NodeMax *int64 `protobuf:"varint,5,opt,name=node_max" json:"node_max,omitempty"` IndexCursor *int64 `protobuf:"varint,7,opt,name=index_cursor" json:"index_cursor,omitempty"` Index *int64 `protobuf:"varint,8,opt,name=index" json:"index,omitempty"` Nodes [][]byte `protobuf:"bytes,9,rep,name=nodes" json:"nodes,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*BtreeMetadata) GetIndex ¶
func (m *BtreeMetadata) GetIndex() int64
func (*BtreeMetadata) GetIndexCursor ¶
func (m *BtreeMetadata) GetIndexCursor() int64
func (*BtreeMetadata) GetLeafMax ¶
func (m *BtreeMetadata) GetLeafMax() int64
func (*BtreeMetadata) GetNodeMax ¶
func (m *BtreeMetadata) GetNodeMax() int64
func (*BtreeMetadata) GetNodes ¶
func (m *BtreeMetadata) GetNodes() [][]byte
func (*BtreeMetadata) GetRoot ¶
func (m *BtreeMetadata) GetRoot() int64
func (*BtreeMetadata) GetSize ¶
func (m *BtreeMetadata) GetSize() int64
func (*BtreeMetadata) ProtoMessage ¶
func (*BtreeMetadata) ProtoMessage()
func (*BtreeMetadata) Reset ¶
func (m *BtreeMetadata) Reset()
func (*BtreeMetadata) String ¶
func (m *BtreeMetadata) String() string
type TreeLog ¶
type TreeLog struct { Action *string `protobuf:"bytes,1,opt,name=action" json:"action,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*TreeLog) ProtoMessage ¶
func (*TreeLog) ProtoMessage()
type TreeNode ¶
type TreeNode struct { Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` Keys [][]byte `protobuf:"bytes,2,rep,name=keys" json:"keys,omitempty"` Childrens []int64 `protobuf:"varint,3,rep,name=childrens" json:"childrens,omitempty"` Values [][]byte `protobuf:"bytes,4,rep,name=values" json:"values,omitempty"` NodeType *int32 `protobuf:"varint,5,opt,name=node_type" json:"node_type,omitempty"` IsDirt *int32 `protobuf:"varint,6,opt,name=is_dirt" json:"is_dirt,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*TreeNode) GetChildrens ¶
func (*TreeNode) GetNodeType ¶
func (*TreeNode) ProtoMessage ¶
func (*TreeNode) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.