Documentation ¶
Index ¶
- Constants
- func Register(c *v1alpha1.EdgeCNIConfig, cli *clients.Clients) error
- type Adapter
- type EdgeCni
- type MeshAdapter
- func (mesh *MeshAdapter) CheckTunCIDR(outerCidr string) (bool, error)
- func (mesh *MeshAdapter) CloseRoute()
- func (mesh *MeshAdapter) GetNodeNameByPodIP(podIP string) (string, error)
- func (mesh *MeshAdapter) HandleReceiveFromTun()
- func (mesh *MeshAdapter) Run()
- func (mesh *MeshAdapter) TunToTunnel()
- func (mesh *MeshAdapter) WatchRoute() error
Constants ¶
View Source
const ( TCP = "tcp" AgentPodName = "edgemesh-agent" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
type Adapter interface { // HandleReceive deal with data from Pod to Tunnel TunToTunnel() // WatchRoute watch CIDR in overlayNetwork and insert Route to Tun dev WatchRoute() error // CloseRoute close all the Tun and stream CloseRoute() }
type EdgeCni ¶
type EdgeCni struct { Config *v1alpha1.EdgeCNIConfig ConfigSyncPeriod time.Duration MeshAdapter *MeshAdapter // contains filtered or unexported fields }
EdgeCni is used for cni traffic control
func (*EdgeCni) CleanupAndExit ¶
type MeshAdapter ¶
type MeshAdapter struct { IptInterface utiliptables.Interface ConfigSyncPeriod time.Duration TunConn *cni.TunConn HostCIDR string Cloud []string // PodCIDR in cloud Edge []string // PodCIDR in edge Close chan struct{} // stop signal // contains filtered or unexported fields }
func NewMeshAdapter ¶
func NewMeshAdapter(cfg *v1alpha1.EdgeCNIConfig, cli clientset.Interface) (*MeshAdapter, error)
func (*MeshAdapter) CheckTunCIDR ¶
func (mesh *MeshAdapter) CheckTunCIDR(outerCidr string) (bool, error)
CheckTunCIDR check whether the mesh CIDR and the given parameter CIDR are in the same network or not.
func (*MeshAdapter) CloseRoute ¶
func (mesh *MeshAdapter) CloseRoute()
func (*MeshAdapter) GetNodeNameByPodIP ¶
func (mesh *MeshAdapter) GetNodeNameByPodIP(podIP string) (string, error)
func (*MeshAdapter) HandleReceiveFromTun ¶
func (mesh *MeshAdapter) HandleReceiveFromTun()
func (*MeshAdapter) Run ¶
func (mesh *MeshAdapter) Run()
func (*MeshAdapter) TunToTunnel ¶
func (mesh *MeshAdapter) TunToTunnel()
func (*MeshAdapter) WatchRoute ¶
func (mesh *MeshAdapter) WatchRoute() error
Click to show internal directories.
Click to hide internal directories.