Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encapsulator ¶
type Encapsulator interface { CleanUp() error Gw(net.IP, net.IP, *net.IPNet) net.IP Index() int Init(int) error Rules([]*net.IPNet) iptables.RuleSet Set(*net.IPNet) error Strategy() Strategy }
Encapsulator can: * configure the encapsulation interface; * determine the gateway IP corresponding to a node; * get the encapsulation interface index; * set the interface IP address; * return the required IPTables rules; * return the encapsulation strategy; and * clean up any changes applied to the backend.
func NewCilium ¶
func NewCilium(strategy Strategy) Encapsulator
NewCilium returns an encapsulator that uses Cilium.
func NewFlannel ¶
func NewFlannel(strategy Strategy) Encapsulator
NewFlannel returns an encapsulator that uses Flannel.
func NewIPIP ¶
func NewIPIP(strategy Strategy) Encapsulator
NewIPIP returns an encapsulator that uses IPIP.
type Noop ¶
type Noop Strategy
Noop is an encapsulation that does nothing.
type Strategy ¶
type Strategy string
Strategy identifies which packets within a location should be encapsulated.
const ( // Never indicates that no packets within a location // should be encapsulated. Never Strategy = "never" // CrossSubnet indicates that only packets that // traverse subnets within a location should be encapsulated. CrossSubnet Strategy = "crosssubnet" // Always indicates that all packets within a location // should be encapsulated. Always Strategy = "always" )
Click to show internal directories.
Click to hide internal directories.