Versions in this module Expand all Collapse all v0 v0.2.3 Feb 27, 2015 v0.2.2 Feb 27, 2015 Changes in this version + var ErrNotFound = fmt.Errorf("merkledag: not found") + func FetchGraph(ctx context.Context, root *Node, serv DAGService) chan struct + func FindLinks(links []u.Key, k u.Key, start int) []int + type DAGService interface + Add func(*Node) (u.Key, error) + AddRecursive func(*Node) error + Get func(u.Key) (*Node, error) + GetDAG func(context.Context, *Node) []NodeGetter + GetNodes func(context.Context, []u.Key) []NodeGetter + Remove func(*Node) error + func NewDAGService(bs *bserv.BlockService) DAGService + type Link struct + Hash mh.Multihash + Name string + Node *Node + Size uint64 + func MakeLink(n *Node) (*Link, error) + func (l *Link) GetNode(serv DAGService) (*Node, error) + type LinkSlice []*Link + func (ls LinkSlice) Len() int + func (ls LinkSlice) Less(a, b int) bool + func (ls LinkSlice) Swap(a, b int) + type Node struct + Data []byte + Links []*Link + func Decoded(encoded []byte) (*Node, error) + func (n *Node) AddNodeLink(name string, that *Node) error + func (n *Node) AddNodeLinkClean(name string, that *Node) error + func (n *Node) Copy() *Node + func (n *Node) Encoded(force bool) ([]byte, error) + func (n *Node) Key() (u.Key, error) + func (n *Node) Marshal() ([]byte, error) + func (n *Node) MarshalTo(encoded []byte) error + func (n *Node) Multihash() (mh.Multihash, error) + func (n *Node) RemoveNodeLink(name string) error + func (n *Node) Size() (uint64, error) + func (n *Node) Stat() (*NodeStat, error) + func (n *Node) Unmarshal(encoded []byte) error + func (n *Node) UpdateNodeLink(name string, that *Node) (*Node, error) + type NodeGetter interface + Get func() (*Node, error) + type NodeMap map[u.Key]*Node + type NodeStat struct + BlockSize int + CumulativeSize int + DataSize int + LinksSize int + NumLinks int + func (ns NodeStat) String() string