Versions in this module Expand all Collapse all v0 v0.2.3 Feb 27, 2015 v0.2.2 Feb 27, 2015 Changes in this version + const IpnsValidatorTag + var DefaultBootstrapConfig = BootstrapConfig + var ErrAlreadyBuilt = errors.New("this builder has already been used") + var ErrNotEnoughBootstrapPeers = errors.New("not enough bootstrap peers to bootstrap") + func Bootstrap(n *IpfsNode, cfg BootstrapConfig) (io.Closer, error) + type BootstrapConfig struct + BootstrapPeers func() []peer.PeerInfo + ConnectionTimeout time.Duration + MinPeerThreshold int + Period time.Duration + func BootstrapConfigWithPeers(pis []peer.PeerInfo) BootstrapConfig + type ConfigOption func(ctx context.Context) (*IpfsNode, error) + func Offline(r repo.Repo) ConfigOption + func Online(r repo.Repo) ConfigOption + func OnlineWithOptions(r repo.Repo, router RoutingOption, ho HostOption) ConfigOption + func Standard(r repo.Repo, online bool) ConfigOption + type HostOption func(ctx context.Context, id peer.ID, ps peer.Peerstore) (p2phost.Host, error) + var DefaultHostOption HostOption = constructPeerHost + type IpfsNode struct + Blocks *bserv.BlockService + Blockstore bstore.Blockstore + Bootstrapper io.Closer + DAG merkledag.DAGService + Diagnostics *diag.Diagnostics + Exchange exchange.Interface + Identity peer.ID + Mounts Mounts + Namesys namesys.NameSystem + PeerHost p2phost.Host + Peerstore peer.Peerstore + Pinning pin.Pinner + PrivateKey ic.PrivKey + Repo repo.Repo + Reprovider *rp.Reprovider + Resolver *path.Resolver + Routing routing.IpfsRouting + func NewIPFSNode(parent context.Context, option ConfigOption) (*IpfsNode, error) + func NewMockNode() (*IpfsNode, error) + func (n *IpfsNode) Bootstrap(cfg BootstrapConfig) error + func (n *IpfsNode) LoadPrivateKey() error + func (n *IpfsNode) OnlineMode() bool + func (n *IpfsNode) Resolve(fpath string) (*merkledag.Node, error) + func (n *IpfsNode) SetupOfflineRouting() error + type Mounts struct + Ipfs mount.Mount + Ipns mount.Mount + type NodeBuilder struct + func NewNodeBuilder() *NodeBuilder + func (nb *NodeBuilder) Build(ctx context.Context) (*IpfsNode, error) + func (nb *NodeBuilder) Offline() *NodeBuilder + func (nb *NodeBuilder) Online() *NodeBuilder + func (nb *NodeBuilder) SetHost(ho HostOption) *NodeBuilder + func (nb *NodeBuilder) SetRepo(r repo.Repo) *NodeBuilder + func (nb *NodeBuilder) SetRouting(ro RoutingOption) *NodeBuilder + type RoutingOption func(context.Context, p2phost.Host, ds.ThreadSafeDatastore) (routing.IpfsRouting, error) + var DHTOption RoutingOption = constructDHTRouting