tunnel

package
v0.11.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package tunnel contains the implementation of the tunneling system used by the Liqo Gateway.

Index

Constants

View Source
const (
	// ServerInterfaceIP is the IP address of the Wireguard interface in server mode.
	ServerInterfaceIP = "169.254.18.1/30"
	// ClientInterfaceIP is the IP address of the Wireguard interface in client mode.
	ClientInterfaceIP = "169.254.18.2/30"
)
View Source
const (
	// TunnelInterfaceName is the name of the tunnel interface used by the Gateway to reach the remote cluster.
	TunnelInterfaceName = "liqo-tunnel"
)

Variables

View Source
var (
	// MetricsPeerReceivedBytes is the metric that counts the number of bytes received from a given peer.
	MetricsPeerReceivedBytes *prometheus.Desc
	// MetricsPeerTransmittedBytes is the metric that counts the number of bytes transmitted to a given peer.
	MetricsPeerTransmittedBytes *prometheus.Desc
	// MetricsPeerLatency is the metric that exposes the latency towards a given peer.
	MetricsPeerLatency *prometheus.Desc
	// MetricsPeerIsConnected is the metric that outputs the connection status.
	MetricsPeerIsConnected *prometheus.Desc
	// MetricsLabels is the labels that are used for the metrics.
	MetricsLabels []string
)

Functions

func AddAddress

func AddAddress(link netlink.Link, ip string) error

AddAddress adds an IP address to the Wireguard interface.

func GetInterfaceIP

func GetInterfaceIP(mode gateway.Mode) string

GetInterfaceIP returns the IP address of the Wireguard interface.

func GetLink(name string) (netlink.Link, error)

GetLink returns the Wireguard interface.

func GetRemoteInterfaceIP

func GetRemoteInterfaceIP(mode gateway.Mode) (string, error)

GetRemoteInterfaceIP returns the IP address of the remote Wireguard interface.

Types

type PrometheusMetrics

type PrometheusMetrics struct{}

PrometheusMetrics is a struct that implements the prometheus.Collector interface's Describe method and other utilities.

func (*PrometheusMetrics) Describe

func (m *PrometheusMetrics) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector.

func (*PrometheusMetrics) MetricsErrorHandler

func (m *PrometheusMetrics) MetricsErrorHandler(err error, ch chan<- prometheus.Metric)

MetricsErrorHandler is a function that handles metrics errors.

Directories

Path Synopsis
Package wireguard contains the implementation of the wireguard tunnel.
Package wireguard contains the implementation of the wireguard tunnel.

Jump to

Keyboard shortcuts

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