core

package
v0.0.0-...-e4696f9 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2014 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const IpnsValidatorTag = "ipns"

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 u.ThreadSafeDatastoreCloser

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

	// current mount state, if any.
	Mounts Mounts

	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

type Mounts

type Mounts struct {
	Ipfs mount.Mount
	Ipns mount.Mount
}

Mounts defines what the node's mount state is. This should perhaps be moved to the daemon or mount. It's here because it needs to be accessible across daemon requests.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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