Versions in this module Expand all Collapse all v0 v0.0.1 Apr 12, 2022 Changes in this version + const UnixfsChunkSize + func BalanceNode(ctx context.Context, f io.Reader, fsize int64, bufDs format.DAGService, ...) (cid.Cid, error) + func NewDagWithData(rd []byte, fsNodeType pb.Data_DataType, cidBuilder cid.Builder) (format.Node, error) + type BatchSplitter struct + func NewBatchSplitter(r io.Reader, size int64, batch int) *BatchSplitter + func (ss *BatchSplitter) NextBytes() ([]*Idxbuf, error) + func (ss *BatchSplitter) Reader() io.Reader + type CommonAPI struct + Node *node.Node + func (a *CommonAPI) Add(ctx context.Context, path string) (chan api.PBar, error) + func (a *CommonAPI) Add2(ctx context.Context, path string, br int) (chan api.PBar, error) + func (a *CommonAPI) Get(ctx context.Context, cid cid.Cid, path string) (chan api.PBar, error) + type DagAPI struct + Node *node.Node + func (a *DagAPI) DagExport(ctx context.Context, c cid.Cid, path string, pad bool, batchNum int, ...) (chan api.PBar, error) + func (a *DagAPI) DagHas(ctx context.Context, cid cid.Cid) (bool, error) + func (a *DagAPI) DagImport(ctx context.Context, targetPath string) (chan api.PBar, error) + func (a *DagAPI) DagStat(ctx context.Context, cid cid.Cid, timeout uint) (*format.NodeStat, error) + func (a *DagAPI) DagSync(ctx context.Context, cids []cid.Cid, concur int) (chan string, error) + type FSNodeOverDag struct + func NewFSNFromDag(nd *merkledag.ProtoNode) (*FSNodeOverDag, error) + func NewFSNodeOverDag(fsNodeType pb.Data_DataType, cidBuilder cid.Builder) *FSNodeOverDag + func (n *FSNodeOverDag) AddChild(link *format.Link, fileSize uint64) error + func (n *FSNodeOverDag) Commit() (format.Node, error) + func (n *FSNodeOverDag) SetFileData(fileData []byte) + type FullNodeAPI struct + type IdxLink struct + FileSize uint64 + Idx int + Link *format.Link + type Idxbuf struct + Buf []byte + Idx int + type NetAPI struct + Host host.Host + func (a *NetAPI) ID(context.Context) (peer.ID, error) + func (a *NetAPI) NetAddrsListen(context.Context) (peer.AddrInfo, error) + func (a *NetAPI) NetConnect(ctx context.Context, p peer.AddrInfo) error + func (a *NetAPI) NetConnectedness(ctx context.Context, pid peer.ID) (network.Connectedness, error) + func (a *NetAPI) NetDisconnect(ctx context.Context, p peer.ID) error + func (a *NetAPI) NetPeers(context.Context) ([]peer.AddrInfo, error)