Documentation
¶
Index ¶
- func Constructor(params json.RawMessage, mkSchema schema.Factory) (schema.Schema, error)
- func Get(ctx context.Context, rs schema.RO, s State, i Pos) (blobcache.CID, error)
- func Includes(ctx context.Context, rs schema.RO, a, b State) (bool, error)
- type CID
- type Iterator
- type Params
- type Pos
- type Schema
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Constructor ¶
Constructor is a schema constructor
Types ¶
type Params ¶
type Params struct {
X blobcache.SchemaSpec `json:"x"`
MaxRootSize int `json:"maxRootSize"`
}
type State ¶
type State struct {
// Levels are the rightmost nodes of a binary merkle tree.
// New entries are always added to level 0, and if there is already a value at that level
// then it is hashed with the new value to produce a new node, which is then inserted at level 1.
// This process is repeated until there is no more space at the current level, and a new level is created.
Levels []CID
}
Click to show internal directories.
Click to hide internal directories.