Documentation
¶
Index ¶
Constants ¶
const ( NONE = L4Type("NONE") // TCP type. TCP = L4Type("TCP") // UDP type. UDP = L4Type("UDP") )
Variables ¶
var ( // AllProtocols is the list of all supported L4 protocols AllProtocols = []L4Type{TCP, UDP} )
Functions ¶
This section is empty.
Types ¶
type FEPort ¶ added in v1.5.0
FEPort represents a frontend port with its ID and the L4Addr's inheritance.
func (*FEPort) EqualsIgnoreID ¶ added in v1.5.0
EqualsIgnoreID returns true if both L4Addr are considered equal without comparing its ID.
type L3n4Addr ¶
L3n4Addr is used to store, as an unique L3+L4 address in the KVStore.
func NewL3n4Addr ¶
NewL3n4Addr creates a new L3n4Addr.
func NewL3n4AddrFromBackendModel ¶
func NewL3n4AddrFromBackendModel(base *models.BackendAddress) (*L3n4Addr, error)
func NewL3n4AddrFromModel ¶
func NewL3n4AddrFromModel(base *models.FrontendAddress) (*L3n4Addr, error)
func (*L3n4Addr) GetModel ¶
func (a *L3n4Addr) GetModel() *models.FrontendAddress
func (*L3n4Addr) IsIPv6 ¶
IsIPv6 returns true if the IP address in the given L3n4Addr is IPv6 or not.
func (*L3n4Addr) String ¶
String returns the L3n4Addr in the "IPv4:Port" format for IPv4 and "[IPv6]:Port" format for IPv6.
func (*L3n4Addr) StringID ¶
StringID returns the L3n4Addr as string to be used for unique identification
func (*L3n4Addr) StringWithProtocol ¶
StringWithProtocol returns the L3n4Addr in the "IPv4:Port/Protocol" format for IPv4 and "[IPv6]:Port/Protocol" format for IPv6.
type L3n4AddrID ¶
L3n4AddrID is used to store, as an unique L3+L4 plus the assigned ID, in the KVStore.
func NewL3n4AddrID ¶
NewL3n4AddrID creates a new L3n4AddrID.
func (*L3n4AddrID) DeepCopy ¶
func (l *L3n4AddrID) DeepCopy() *L3n4AddrID
DeepCopy returns a DeepCopy of the given L3n4AddrID.
func (*L3n4AddrID) IsIPv6 ¶
func (l *L3n4AddrID) IsIPv6() bool
IsIPv6 returns true if the IP address in L3n4Addr's L3n4AddrID is IPv6 or not.
type L4Addr ¶
L4Addr is an abstraction for the backend port with a L4Type, usually tcp or udp, and the Port number.
type LBBackEnd ¶ added in v1.5.0
LBBackEnd represents load balancer backend.
func NewLBBackEnd ¶ added in v1.5.0
func NewLBBackEndFromBackendModel ¶ added in v1.5.0
func NewLBBackEndFromBackendModel(base *models.BackendAddress) (*LBBackEnd, error)
func (*LBBackEnd) GetBackendModel ¶ added in v1.5.0
func (b *LBBackEnd) GetBackendModel() *models.BackendAddress
type LBSVC ¶ added in v1.5.0
type LBSVC struct { Sha256 string FE L3n4AddrID BES []LBBackEnd }
LBSVC is essentially used for the REST API.
type LoadBalancer ¶ added in v1.5.0
type LoadBalancer struct { BPFMapMU lock.RWMutex SVCMap SVCMap SVCMapID SVCMapID RevNATMap RevNATMap }
LoadBalancer is the internal representation of the loadbalancer in the local cilium daemon.
func NewLoadBalancer ¶ added in v1.5.0
func NewLoadBalancer() *LoadBalancer
NewLoadBalancer returns a LoadBalancer with all maps initialized.
func (*LoadBalancer) AddService ¶ added in v1.5.0
func (lb *LoadBalancer) AddService(svc LBSVC) bool
AddService adds a service to list of loadbalancers and returns true if created.
func (*LoadBalancer) DeleteService ¶ added in v1.5.0
func (lb *LoadBalancer) DeleteService(svc *LBSVC)
DeleteService deletes svc from lb's SVCMap and SVCMapID.
type SVCMap ¶ added in v1.5.0
SVCMap is a map of the daemon's services. The key is the sha256sum of the LBSVC's FE and the value the LBSVC.
func (SVCMap) AddFEnBE ¶ added in v1.5.0
func (svcs SVCMap) AddFEnBE(fe *L3n4AddrID, be *LBBackEnd, beIndex int) *LBSVC
AddFEnBE adds the given 'fe' and 'be' to the SVCMap. If 'fe' exists and beIndex is 0, the new 'be' will be appended to the list of existing backends. If beIndex is bigger than the size of existing backends slice, it will be created a new array with size of beIndex and the new 'be' will be inserted on index beIndex-1 of that new array. All remaining be elements will be kept on the same index and, in case the new array is larger than the number of backends, some elements will be empty.