relaymgr

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RelayManager

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

RelayManager connects a libp2p host to an external relay and do a best-effort in keeping the connection healthy.

func New

func New(ctx context.Context, h host.Host, relayMultiaddress string) (*RelayManager, error)

New connects the provided host to the remote relay, doing a best-effort in keeping the connection healthy. The provided context is only used for the initial connection to the relay. To shutdown call Close().

func (*RelayManager) Close

func (rm *RelayManager) Close() error

Close stops relay manager work to keep a healthy connection with the relay.

Jump to

Keyboard shortcuts

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