pluginlocalp2pd

package
v0.0.0-...-ce94876 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2019 License: MIT, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName is the libp2p daemon IPTB plugin name.
	PluginName = "localp2pd"
)

Variables

This section is empty.

Functions

func GetAttrDesc

func GetAttrDesc(attr string) (string, error)

func GetAttrList

func GetAttrList() []string

func NewNode

func NewNode(dir string, attrs map[string]string) (testbedi.Core, error)

NewNode creates a localp2pd iptb core node that runs the libp2p daemon on the local system using control sockets within the specified directory. Attributes: - controladdr:

Types

type LocalP2pd

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

LocalP2pd wraps behaviors of the libp2p daemon.

func (*LocalP2pd) APIAddr

func (l *LocalP2pd) APIAddr() (string, error)

APIAddr returns the multiaddr for the api

func (*LocalP2pd) Attr

func (l *LocalP2pd) Attr(attr string) (string, error)

func (*LocalP2pd) Connect

func (l *LocalP2pd) Connect(ctx context.Context, n testbedi.Core) error

Connect the node to another

func (*LocalP2pd) Dir

func (l *LocalP2pd) Dir() string

Dir returns the iptb directory assigned to the node

func (*LocalP2pd) GetAttrDesc

func (l *LocalP2pd) GetAttrDesc(attr string) (string, error)

func (*LocalP2pd) GetAttrList

func (l *LocalP2pd) GetAttrList() []string

func (*LocalP2pd) Init

func (l *LocalP2pd) Init(ctx context.Context, args ...string) (testbedi.Output, error)

Init is a no-op

func (*LocalP2pd) PeerID

func (l *LocalP2pd) PeerID() (string, error)

PeerID returns the peer id

func (*LocalP2pd) RunCmd

func (l *LocalP2pd) RunCmd(ctx context.Context, stdin io.Reader, args ...string) (testbedi.Output, error)

RunCmd is a no-op for the libp2p daemon

func (*LocalP2pd) SetAttr

func (l *LocalP2pd) SetAttr(string, string) error

func (*LocalP2pd) Shell

func (l *LocalP2pd) Shell(ctx context.Context, ns []testbedi.Core) error

Shell is a no-op for the libp2p daemon.

func (*LocalP2pd) Start

func (l *LocalP2pd) Start(ctx context.Context, wait bool, args ...string) (testbedi.Output, error)

Start launches a libp2p daemon

func (*LocalP2pd) Stop

func (l *LocalP2pd) Stop(ctx context.Context) error

Stop shuts down the daemon

func (*LocalP2pd) String

func (l *LocalP2pd) String() string

func (*LocalP2pd) SwarmAddrs

func (l *LocalP2pd) SwarmAddrs() ([]string, error)

SwarmAddrs returns the swarm addrs for the node

func (*LocalP2pd) Type

func (l *LocalP2pd) Type() string

Type returns a string that identifies the implementation Examples localipfs, dockeripfs, etc.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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