Documentation ¶
Index ¶
Constants ¶
const ( FoU4LinkPrefix = "fou4_" FoU6LinkPrefix = "fou6_" )
Prefixes for Foo-over-UDP tunnel link names
Variables ¶
var ErrIPFamilyMismatch = errors.New("no matching IP family")
ErrIPFamilyMismatch is the sentinel error to indicate that FoUTunnel or Egress cannot handle the given address because it is not setup for the address family.
Functions ¶
This section is empty.
Types ¶
type Egress ¶
Egress represents NAT and routing service running on egress Pods. Methods are idempotent; i.e. they can be called multiple times.
type FoUTunnel ¶
type FoUTunnel interface { // Init starts FoU listening socket. Init() error // AddPeer setups tunnel devices to the given peer and returns them. // If FoUTunnel does not setup for the IP family of the given address, // this returns ErrIPFamilyMismatch error. AddPeer(net.IP) (netlink.Link, error) // DelPeer deletes tunnel for the peer, if any. DelPeer(net.IP) error }
FoUTunnel represents the interface for Foo-over-UDP tunnels. Methods are idempotent; i.e. they can be called multiple times.
type NatClient ¶
NatClient represents the interface for NAT client This can be re-initialized by calling `Init` again.
func NewNatClient ¶
NewNatClient creates a NatClient.
`ipv4` and `ipv6` are IPv4 and IPv6 addresses of the client pod. Either one of them can be nil.
`podNodeNet` is, if given, are networks for Pod and Node addresses. If all the addresses of Pods and Nodes are within IPv4/v6 private addresses, `podNodeNet` can be left nil.