tunneler

package
v0.6.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: Apache-2.0 Imports: 2 Imported by: 6

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         string   `json:"podip"`
	PodHwAddr     string   `json:"pod-hw-addr"`
	InterfaceName string   `json:"interface"`
	WorkerNodeIP  string   `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 string
	GW  string
	Dev string
}

type Tunneler

type Tunneler interface {
	Setup(nsPath string, podNodeIPs []net.IP, 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