Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Info() (Info, error)
Config() (Config, error)
SetConfig(Config) error
Services() ([]ServiceExtended, error)
Service(Service) (ServiceExtended, error)
CreateService(Service) error
UpdateService(Service) error
RemoveService(Service) error
Destinations(Service) ([]DestinationExtended, error)
CreateDestination(Service, Destination) error
UpdateDestination(Service, Destination) error
RemoveDestination(Service, Destination) error
// SetService combines the functionality of CreateService,
// UpdateService, CreateDestination, UpdateDestination and
// RemoveDestination. If the service does not exist it will be
// created with the given parameters and destinations, or updated
// to match them if extant.
SetService(Service, ...Destination) error
VIPs() ([]VIP, error)
VIP(netip.Addr) (VIP, error)
// NAT returns an address which can be used to query a specific
// virtual IP on a backend ("real") server, this can be used to
// implement health checks which accurately reflect the ability of
// the backend to serve traffic for a particular VIP.
NAT(vip, rip netip.Addr) (nat netip.Addr)
// ReadFlow retrieves an opaque flow record from a queue written
// to by the kernel. If no flow records are available then a zero
// length slice is returned. This can be used to share flow state
// with peers, storing the flow with the WriteFlow()
// function. Stale records in the queue (older than a few seconds)
// are skipped.
ReadFlow() []byte
WriteFlow([]byte)
}
type Destination ¶
type DestinationExtended ¶
type Options ¶ added in v0.2.0
type Options struct {
DriverMode bool // Use XDP_FLAGS_DRV_MODE flag when attaching interface
Bonding bool // Explicitly declare interfaces to be aggregated
BPFProgram []byte // Override the embedded BPF program with this object code
FlowsPerCPU uint32 // Override default size of flow tracking tables
InterfaceInitDelay uint8 // Pause (seconds) between each link attach/detach; to prevent bonds flapping
IPv4VLANs map[uint16]netip.Prefix // VLAN ID/IPv4 Prefix mapping
IPv6VLANs map[uint16]netip.Prefix // VLAN ID/IPv6 Prefix mapping
Routes map[netip.Prefix]uint16 // Override route selection for layer 3 backends; prefix-to-VLAN ID map
Logger Logger
}
type ServiceExtended ¶
type TunnelType ¶ added in v0.2.0
type TunnelType uint8
const ( NONE TunnelType = bpf.T_NONE IPIP TunnelType = bpf.T_IPIP GRE TunnelType = bpf.T_GRE FOU TunnelType = bpf.T_FOU GUE TunnelType = bpf.T_GUE )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.