tunneler

package
v0.8.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(tunnelType string, newWorkerNodeTunneler, newPodNodeTunneler func() Tunneler)

Types

type Config

type Config struct {
	PodIP         netip.Prefix `json:"podip"`
	PodHwAddr     string       `json:"pod-hw-addr"`
	InterfaceName string       `json:"interface"`
	WorkerNodeIP  netip.Prefix `json:"worker-node-ip"`
	TunnelType    string       `json:"tunnel-type"`
	Routes        []*Route     `json:"routes"`
	MTU           int          `json:"mtu"`
	Index         int          `json:"index"`
	VXLANPort     int          `json:"vxlan-port,omitempty"`
	VXLANID       int          `json:"vxlan-id,omitempty"`
	Dedicated     bool         `json:"dedicated"`
}

type Route

type Route struct {
	Dst netip.Prefix
	GW  netip.Addr
	Dev string
}

type Tunneler

type Tunneler interface {
	Setup(nsPath string, podNodeIPs []netip.Addr, config *Config) error
	Teardown(nsPath, hostInterface string, config *Config) error
}

func PodNodeTunneler

func PodNodeTunneler(tunnelType string) (Tunneler, error)

func WorkerNodeTunneler

func WorkerNodeTunneler(tunnelType string) (Tunneler, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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