trafficmngr

package
v0.26.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const KubeProxyMark string = "0x4000/0x4000"

Variables

View Source
var (
	ErrUnimplemented = errors.New("unimplemented")
)

Functions

This section is empty.

Types

type IPTablesRule

type IPTablesRule struct {
	Table    string
	Action   string
	Chain    string
	Rulespec []string
}

type TrafficManager

type TrafficManager interface {
	// Initialize the TrafficManager, including the go routine to clean-up when flanneld is closed
	Init(ctx context.Context, wg *sync.WaitGroup) error
	// Install kernel rules to forward the traffic to and from the flannel network range.
	// This is done for IPv4 and/or IPv6 based on whether flannelIPv4Network and flannelIPv6Network are set.
	// SetupAndEnsureForwardRules starts a go routine that
	// rewrites these rules every resyncPeriod seconds if needed
	SetupAndEnsureForwardRules(ctx context.Context, flannelIPv4Network ip.IP4Net, flannelIPv6Network ip.IP6Net, resyncPeriod int)
	// Install kernel rules to setup NATing of packets sent to the flannel interface
	// This is done for IPv4 and/or IPv6 based on whether flannelIPv4Network and flannelIPv6Network are set.
	// prevSubnet,prevNetworks, prevIPv6Subnet, prevIPv6Networks are used
	// to determine whether the existing rules need to be replaced.
	// SetupAndEnsureMasqRules starts a go routine that
	// rewrites these rules every resyncPeriod seconds if needed
	SetupAndEnsureMasqRules(ctx context.Context,
		flannelIPv4Net, prevSubnet, prevNetwork ip.IP4Net,
		flannelIPv6Net, prevIPv6Subnet, prevIPv6Network ip.IP6Net,
		currentlease *lease.Lease,
		resyncPeriod int) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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