core

package
v0.0.0-...-bebc87d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2014 License: MIT Imports: 22 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL