core

package
v0.0.0-...-c9e5fdf Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2014 License: MIT Imports: 31 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.ThreadSafeDatastore

	// 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

	// the name system, resolves paths to hashes
	Namesys namesys.NameSystem

	// the diagnostics service
	Diagnostics *diag.Diagnostics

	// the pinning manager
	Pinning pin.Pinner

	ctxc.ContextCloser
	// contains filtered or unexported fields
}

IpfsNode is IPFS Core module. It represents an IPFS instance.

func NewIpfsNode

func NewIpfsNode(cfg *config.Config, online bool) (n *IpfsNode, err error)

NewIpfsNode constructs a new IpfsNode based on the given config.

func NewMockNode

func NewMockNode() (*IpfsNode, error)

NewMockNode constructs an IpfsNode for use in tests.

func (*IpfsNode) OnlineMode

func (n *IpfsNode) OnlineMode() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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