Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func CreateNode ¶
func CreateNode(repoPath string, args NodeConfArgs) (node *Node, err error)
CreateNode creates an IPFS node and returns its coreAPI
func (*Node) Add ¶
func (n *Node) Add(path string, onlyHash bool) (cid string, err error)
Add imports a file to IPFS and returns the file identifier to ait.
func (*Node) FindProvs ¶
func (n *Node) FindProvs(hash string, maxPeers int) (replications int, err error)
FindProvs queries the IPFS network for the number of providers hosting a given file
type NodeConfArgs ¶
type NodeConfArgs struct {
SwarmKey string
BootstrapPeers []string
}
Click to show internal directories.
Click to hide internal directories.