peer

package
v0.0.0-...-249e25c Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RPCClientRetries = 3
	RPCClientBackoff = 2
	RPCClientDelay   = 100 * time.Millisecond
	RPCClientTimeout = time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Control

type Control interface {
	HandlePeer(peer *vnic.Peer)
	AddPeerHandler(h PeerHandler)
}

func NewControl

func NewControl(
	logger *zap.Logger,
	observers *event.Observers,
	vpn *vpn.Host,
	handlers ...PeerHandler,
) Control

NewControl ...

type PeerHandler

type PeerHandler interface {
	AddPeer(id uint64, p *vnic.Peer, s *rpc.Server, c rpc.Caller)
	RemovePeer(id uint64)
}

Jump to

Keyboard shortcuts

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