libp2pctl

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnID

type ConnID struct {
	Local, Remote EndpointID
}

ConnID is the identifier of a connection.

func ConnIDFromConn

func ConnIDFromConn(conn network.Conn) ConnID

ConnIDFromConn returns the name of the given connection.

func (ConnID) Key

func (n ConnID) Key() ConnKey

Key returns a struct usable as a map key.

type ConnKey

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

ConnKey is a connection identifier, usable as a map key.

func (ConnKey) ID

func (k ConnKey) ID() (ConnID, error)

ID returns the connection ID.

type EndpointID

type EndpointID struct {
	ID   peer.ID
	Addr ma.Multiaddr
}

EndpointID is a libp2p connection endpoint.

func EndpointIDFromURLVar

func EndpointIDFromURLVar(v string) (EndpointID, error)

EndpointIDFromURLVar parses the given URL-variable-format endpoint ID in the peer-id@url64-encoded-binary-multiaddr format into connection endpoint ID.

func (EndpointID) Key

func (epid EndpointID) Key() EndpointKey

Key returns a struct usable as a map key.

func (EndpointID) URLVar

func (epid EndpointID) URLVar() string

URLVar returns the encoded form of the receiver, suitable for use in a URL.

type EndpointKey

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

EndpointKey is a libp2p connection endpoint, usable as a map key.

func (EndpointKey) ID

func (k EndpointKey) ID() (EndpointID, error)

ID returns the endpoint ID.

type Instance

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

Instance is a libp2pctl instance.

func New

func New(host host.Host) *Instance

New returns a libp2pctl instance associated with the given libp2p host.

func (*Instance) Handler

func (inst *Instance) Handler() http.Handler

Handler returns an HTTP request handler of the libp2pctl instance.

Jump to

Keyboard shortcuts

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