Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IpfsNode ¶
type IpfsNode struct {
// the node's configuration
Config *config.Config
// the local node's identity
Identity *peer.Peer
// storage for other Peer instances
Peerstore peer.Peerstore
// the local datastore
Datastore ds.Datastore
// the network message stream
Network inet.Network
// the routing system. recommend ipfs-dht
Routing routing.IpfsRouting
// the block exchange + strategy (bitswap)
Exchange exchange.Interface
// the block service, get/add blocks.
Blocks *bserv.BlockService
// the merkle dag service, get/add objects.
DAG *merkledag.DAGService
// the path resolution system
Resolver *path.Resolver
}
IpfsNode is IPFS Core module. It represents an IPFS instance.
func NewIpfsNode ¶
func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error)
NewIpfsNode constructs a new IpfsNode based on the given config.
func (*IpfsNode) PinDagNode ¶
func (n *IpfsNode) PinDagNode(nd *merkledag.Node) error
PinDagNode ensures a given node is stored persistently locally.
Click to show internal directories.
Click to hide internal directories.