networking

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PeerConnectionCheckInterval - time interval to check peer connection status
	PeerConnectionCheckInterval = time.Second * 15
	// LastHandShakeThreshold - threshold for considering inactive connection
	LastHandShakeThreshold = time.Minute * 3
	//
	PeerLocalEndpointConnTicker *time.Ticker
)

Functions

func CheckPeerEndpoints added in v1.2.0

func CheckPeerEndpoints(ctx context.Context, waitg *sync.WaitGroup)

func FindBestEndpoint

func FindBestEndpoint(peerIp, peerPubKey string, peerListenPort, metricsPort int)

FindBestEndpoint - requests against a given addr and port

func GetPeerInfo added in v1.2.0

func GetPeerInfo() (models.HostPeerInfo, error)

func InitialiseIfaceMetricsServer added in v0.90.0

func InitialiseIfaceMetricsServer(ctx context.Context, wg *sync.WaitGroup)

func IpBelongsToInterface added in v0.90.0

func IpBelongsToInterface(ip net.IP) bool

IpBelongsToInterface - function to check if an IP belongs to any network interface

func IsPeerConnected added in v1.2.0

func IsPeerConnected(peer wgtypes.Peer) (connected bool, err error)

isPeerConnected - get peer connection status by checking last handshake time

func SetPeerEndpoint added in v1.0.0

func SetPeerEndpoint(peerPubKey string, value cache.EndpointCacheValue) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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