Documentation ¶
Index ¶
- Constants
- Variables
- type DiffOp
- type MerkleSearchTree
- func (mst *MerkleSearchTree) Add(ctx context.Context, key string, val cid.Cid, knownZeros int) (*MerkleSearchTree, error)
- func (mst *MerkleSearchTree) Delete(ctx context.Context, k string) (*MerkleSearchTree, error)
- func (mst *MerkleSearchTree) Get(ctx context.Context, k string) (cid.Cid, error)
- func (mst *MerkleSearchTree) GetPointer(ctx context.Context) (cid.Cid, error)
- func (mst *MerkleSearchTree) WalkLeavesFrom(ctx context.Context, key string, cb func(n NodeEntry) error) error
- type NodeData
- type NodeEntry
- type TreeEntry
Constants ¶
View Source
const ( EntryUndefined = 0 EntryLeaf = 1 EntryTree = 2 )
Variables ¶
View Source
var ErrNotFound = fmt.Errorf("mst: not found")
Functions ¶
This section is empty.
Types ¶
type DiffOp ¶
func DiffTrees ¶
func DiffTrees(ctx context.Context, bs blockstore.Blockstore, from, to cid.Cid) ([]*DiffOp, error)
TODO: this code isnt great, should be rewritten on top of the baseline datastructures once functional and correct
type MerkleSearchTree ¶
type MerkleSearchTree struct {
// contains filtered or unexported fields
}
func (*MerkleSearchTree) Add ¶
func (mst *MerkleSearchTree) Add(ctx context.Context, key string, val cid.Cid, knownZeros int) (*MerkleSearchTree, error)
func (*MerkleSearchTree) Delete ¶
func (mst *MerkleSearchTree) Delete(ctx context.Context, k string) (*MerkleSearchTree, error)
func (*MerkleSearchTree) Get ¶
func (mst *MerkleSearchTree) Get(ctx context.Context, k string) (cid.Cid, error)
func (*MerkleSearchTree) GetPointer ¶
func (mst *MerkleSearchTree) GetPointer(ctx context.Context) (cid.Cid, error)
func (*MerkleSearchTree) WalkLeavesFrom ¶
type NodeEntry ¶
type NodeEntry struct { Kind int Key string Val cid.Cid Tree *MerkleSearchTree }
Click to show internal directories.
Click to hide internal directories.