Documentation ¶
Index ¶
- func NewDummyHost(numericID int, sourceAddr t.NodeAddress) host.Host
- func NewDummyHostAddr(id, basePort int) multiaddr.Multiaddr
- func NewDummyHostKey(numericID int) libp2pcrypto.PrivKey
- func NewDummyHostNoListen(numericID int, _ t.NodeAddress) host.Host
- func NewDummyHostWithPrivKey(listenAddr t.NodeAddress, privKey libp2pcrypto.PrivKey) (host.Host, error)
- func NewDummyMultiaddr(numericID int, sourceAddr t.NodeAddress) multiaddr.Multiaddr
- func NewFakeMultiaddr(numericID, port int) multiaddr.Multiaddr
- func NewFreeHostAddr() (m multiaddr.Multiaddr)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDummyHost ¶
func NewDummyHost(numericID int, sourceAddr t.NodeAddress) host.Host
NewDummyHost creates an insecure libp2p host for test and demonstration purposes.
func NewDummyHostAddr ¶
func NewDummyHostAddr(id, basePort int) multiaddr.Multiaddr
NewDummyHostAddr generates a libp2p host address for test and demonstration purposes.
func NewDummyHostKey ¶
func NewDummyHostKey(numericID int) libp2pcrypto.PrivKey
func NewDummyHostNoListen ¶ added in v0.2.2
func NewDummyHostNoListen(numericID int, _ t.NodeAddress) host.Host
NewDummyHostNoListen creates an insecure libp2p host for test and demonstration purposes without listening interface.
func NewDummyHostWithPrivKey ¶
func NewDummyHostWithPrivKey(listenAddr t.NodeAddress, privKey libp2pcrypto.PrivKey) (host.Host, error)
NewDummyHostWithPrivKey creates new dummy libp2p host with an identity determined by the private key given as an input.
func NewDummyMultiaddr ¶
func NewDummyMultiaddr(numericID int, sourceAddr t.NodeAddress) multiaddr.Multiaddr
NewDummyMultiaddr generates a libp2p peer multiaddress for the host generated by NewDummyHost(id, basePort).
func NewFakeMultiaddr ¶
func NewFakeMultiaddr(numericID, port int) multiaddr.Multiaddr
NewFakeMultiaddr generates a libp2p peer multiaddress for a non existed host.
func NewFreeHostAddr ¶
func NewFreeHostAddr() (m multiaddr.Multiaddr)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.