Documentation ¶
Index ¶
Constants ¶
View Source
const ( IPADDR int = 0 MACADDR int = 3 // TODO: // Make loadbalancer capable of redirecting traffic // through other interfaces. IFNAME int = 5 DEFAULT_ARP_PATH = "/proc/net/arp" )
View Source
const ( LB_SIZE_BYTES = 14 EGRESS_SIZE_BYTES = 14 )
View Source
const BACKEND_SIZE_BYTES = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { IP net.IP Mac net.HardwareAddr }
func (*Backend) MarshalBinary ¶
type Egress ¶
type Egress struct { IP net.IP Mac net.HardwareAddr Index int }
func (*Egress) MarshalBinary ¶
type LoadBalancer ¶
func NewLoadBalancer ¶
func NewLoadBalancer(ifName string, config string, arp string) (*LoadBalancer, error)
func (*LoadBalancer) MarshalBinary ¶
func (lb *LoadBalancer) MarshalBinary() ([]byte, error)
func (*LoadBalancer) WriteBackends ¶
func (lb *LoadBalancer) WriteBackends(m *ebpf.Map) error
func (*LoadBalancer) WriteToMap ¶
func (lb *LoadBalancer) WriteToMap(lbMap *ebpf.Map) error
WriteToMap writes the load balancer's addresses into the LbMetadata map.
Click to show internal directories.
Click to hide internal directories.