p2pd

package
v0.0.0-...-15711b3 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2019 License: MIT, Apache-2.0, MIT Imports: 27 Imported by: 0

README

libp2p Daemon

GoDoc Coverage Status Build Status

A standalone deployment of a libp2p host, running in its own OS process and installing a set of virtual endpoints to enable co-local applications to: communicate with peers, handle protocols, interact with the DHT, participate in pubsub, etc. no matter the language they are developed in, nor whether a native libp2p implementation exists in that language.

🚧 This project is under active development! 🚧

Check out the ROADMAP to see what's coming.

Install

Note that go1.11 is required.

$ go get github.com/libp2p/go-libp2p-daemon
$ cd $GOPATH/src/github.com/libp2p/go-libp2p-daemon
$ make
$ p2pd

Usage

Check out the GoDocs.

Implementing Language Bindings

See the spec for the daemon control protocol and API.

Reference implementations:

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

License

MIT

Documentation

Index

Constants

View Source
const BootstrapConnections = 4
View Source
const DefaultTimeout = 60 * time.Second

Variables

View Source
var BootstrapPeers = dht.DefaultBootstrapPeers

Functions

func ReadIdentity

func ReadIdentity(path string) (crypto.PrivKey, error)

func WriteIdentity

func WriteIdentity(k crypto.PrivKey, path string) error

Types

type Daemon

type Daemon struct {
	// contains filtered or unexported fields
}

func NewDaemon

func NewDaemon(ctx context.Context, maddr ma.Multiaddr, dhtEnabled bool, dhtClient bool, opts ...libp2p.Option) (*Daemon, error)

func (*Daemon) Addrs

func (d *Daemon) Addrs() []ma.Multiaddr

func (*Daemon) Bootstrap

func (d *Daemon) Bootstrap() error

func (*Daemon) DHTRoutingFactory

func (d *Daemon) DHTRoutingFactory(opts []dhtopts.Option) func(host.Host) (routing.PeerRouting, error)

func (*Daemon) EnableAutoNAT

func (d *Daemon) EnableAutoNAT(opts ...libp2p.Option) error

func (*Daemon) EnablePubsub

func (d *Daemon) EnablePubsub(router string, sign, strict bool) error

func (*Daemon) ID

func (d *Daemon) ID() peer.ID

func (*Daemon) Listener

func (d *Daemon) Listener() manet.Listener

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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