Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
func NewEndpoint ¶
func NewEndpoint(epctx *EndpointCtx) *Endpoint
func (*Endpoint) Destroy ¶
Destroy destroys the endpoint for local endpoints it deletes the veth itfce from the container ns for remote endpoints it deletes the tun interface and xdp
func (*Endpoint) Exists ¶
Exists validates if the endpoint exists Local endpoints check interface in container namespace Remote endpoints get peerID random name from peerIndex
func (*Endpoint) InitPeerVethIndex ¶
func (*Endpoint) SetMAC ¶
func (r *Endpoint) SetMAC(mac net.HardwareAddr)
SetMAC sets the mac on the endpoint
type EndpointCtx ¶
type EndpointCtx struct { IfName string HostConnectivity invv1alpha1.HostConnectivity ClusterConnectivity invv1alpha1.ClusterConnectivity NsPath string HostIP string XDP xdp.XDP }
type Link ¶
type Link struct {
// contains filtered or unexported fields
}
func (*Link) Deploy ¶
Deploy deploys the link on the host Creates a veth pair Per endpoint deploys either a veth itfce in the container namespace or a remote tunnel for which a veth pair gets cross connected with BPF XDP
func (*Link) Exists ¶
Exists returns true if the link exists. Since we have 2 endpoints it might be some part does not exist. if only a part exists we return true
func (*Link) HasLocal ¶
HasLocal returns true is one endpoint of the link is local to the host this indicated that a wiring activity is needed
func (*Link) IsCrossCluster ¶
IsCrossCluster returns true if the link is connected accross clusters
func (*Link) IsHostLocal ¶
IsHostLocal returns true if both endpoints are on the same host the wiring in this case is all local to the host