peer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostInfo added in v0.2.0

type HostInfo struct {
	Addr      string
	PublicKey string
}

type PeeringService added in v0.2.0

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

PeeringService uses Wireguard to connect to other machines and route traffic to them.

func New

func New(mask string, keypath string, wginterface string, port uint16) (*PeeringService, error)

New creates a new PeeringService.

func (*PeeringService) GetHostID added in v0.2.0

func (p *PeeringService) GetHostID() (uint8, error)

func (*PeeringService) InitPeering added in v0.2.0

func (p *PeeringService) InitPeering(remotes map[orchestrator.Host]HostInfo) error

func (*PeeringService) Register added in v0.2.0

func (p *PeeringService) Register(host orchestrator.Host) (publickey string, listenaddr string, err error)

func (*PeeringService) Route added in v0.2.0

func (p *PeeringService) Route(network net.IPNet, host orchestrator.Host) error

func (*PeeringService) Stop added in v0.2.0

func (p *PeeringService) Stop() error

Jump to

Keyboard shortcuts

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