connectivity

package
v0.18.1-calicov3.21.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2022 License: Apache-2.0, Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FLAT      = "flat"
	IPSEC     = "ipsec"
	VXLAN     = "vxlan"
	IPIP      = "ipip"
	WIREGUARD = "wireguard"
	SRv6      = "srv6"
)
View Source
const (
	AddChange    change = 0
	DeleteChange change = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectivityProvider

type ConnectivityProvider interface {
	AddConnectivity(cn *common.NodeConnectivity) error
	DelConnectivity(cn *common.NodeConnectivity) error
	/* Called when VPP signals us that it has restarted */
	OnVppRestart()
	/* Check current state in VPP and update local cache */
	RescanState()
	/* is it enabled in the config ? */
	Enabled() bool
}

type ConnectivityProviderData

type ConnectivityProviderData struct {
	// contains filtered or unexported fields
}

func NewConnectivityProviderData

func NewConnectivityProviderData(
	vpp *vpplink.VppLink,
	server *ConnectivityServer,
	log *logrus.Entry,
) *ConnectivityProviderData

func (*ConnectivityProviderData) Clientv3

func (*ConnectivityProviderData) GetFelixConfig

func (*ConnectivityProviderData) GetNodeByIp

func (p *ConnectivityProviderData) GetNodeByIp(addr net.IP) *oldv3.Node

func (*ConnectivityProviderData) GetNodeIPs

func (p *ConnectivityProviderData) GetNodeIPs() (*net.IP, *net.IP)

type ConnectivityServer

type ConnectivityServer struct {
	Clientv3 calicov3cli.Interface
	// contains filtered or unexported fields
}

func NewConnectivityServer

func NewConnectivityServer(vpp *vpplink.VppLink, ipam watchers.IpamCache,
	clientv3 calicov3cli.Interface, log *logrus.Entry) *ConnectivityServer

func (*ConnectivityServer) GetNodeByIp

func (s *ConnectivityServer) GetNodeByIp(addr net.IP) *oldv3.Node

func (*ConnectivityServer) GetNodeIPNet

func (s *ConnectivityServer) GetNodeIPNet(isv6 bool) *net.IPNet

func (*ConnectivityServer) GetNodeIPs

func (s *ConnectivityServer) GetNodeIPs() (ip4 *net.IP, ip6 *net.IP)

func (*ConnectivityServer) OnVppRestart

func (s *ConnectivityServer) OnVppRestart()

func (*ConnectivityServer) ServeConnectivity

func (s *ConnectivityServer) ServeConnectivity(t *tomb.Tomb) error

func (*ConnectivityServer) SetOurBGPSpec

func (s *ConnectivityServer) SetOurBGPSpec(nodeBGPSpec *oldv3.NodeBGPSpec)

type FlatL3Provider

type FlatL3Provider struct {
	*ConnectivityProviderData
}

func NewFlatL3Provider

func NewFlatL3Provider(d *ConnectivityProviderData) *FlatL3Provider

func (*FlatL3Provider) AddConnectivity

func (p *FlatL3Provider) AddConnectivity(cn *common.NodeConnectivity) error

func (*FlatL3Provider) DelConnectivity

func (p *FlatL3Provider) DelConnectivity(cn *common.NodeConnectivity) error

func (*FlatL3Provider) Enabled

func (p *FlatL3Provider) Enabled() bool

func (*FlatL3Provider) OnVppRestart

func (p *FlatL3Provider) OnVppRestart()

func (*FlatL3Provider) RescanState

func (p *FlatL3Provider) RescanState()

type IpipProvider

type IpipProvider struct {
	*ConnectivityProviderData
	// contains filtered or unexported fields
}

func NewIPIPProvider

func NewIPIPProvider(d *ConnectivityProviderData) *IpipProvider

func (*IpipProvider) AddConnectivity

func (p *IpipProvider) AddConnectivity(cn *common.NodeConnectivity) error

func (*IpipProvider) DelConnectivity

func (p *IpipProvider) DelConnectivity(cn *common.NodeConnectivity) error

func (*IpipProvider) Enabled

func (p *IpipProvider) Enabled() bool

func (*IpipProvider) OnVppRestart

func (p *IpipProvider) OnVppRestart()

func (*IpipProvider) RescanState

func (p *IpipProvider) RescanState()

type IpsecProvider

type IpsecProvider struct {
	*ConnectivityProviderData
	// contains filtered or unexported fields
}

func NewIPsecProvider

func NewIPsecProvider(d *ConnectivityProviderData) *IpsecProvider

func (*IpsecProvider) AddConnectivity

func (p *IpsecProvider) AddConnectivity(cn *common.NodeConnectivity) (err error)

func (*IpsecProvider) DelConnectivity

func (p *IpsecProvider) DelConnectivity(cn *common.NodeConnectivity) (err error)

func (*IpsecProvider) Enabled

func (p *IpsecProvider) Enabled() bool

func (*IpsecProvider) OnVppRestart

func (p *IpsecProvider) OnVppRestart()

func (*IpsecProvider) RescanState

func (p *IpsecProvider) RescanState()

type NodeToPolicies

type NodeToPolicies struct {
	Node       net.IP
	SRv6Tunnel []common.SRv6Tunnel
}

type NodeToPrefixes

type NodeToPrefixes struct {
	Node     net.IP
	Prefixes []ip_types.Prefix
}

type SRv6Provider

type SRv6Provider struct {
	*ConnectivityProviderData
	// contains filtered or unexported fields
}

func NewSRv6Provider

func NewSRv6Provider(d *ConnectivityProviderData) *SRv6Provider

func (*SRv6Provider) AddConnectivity

func (p *SRv6Provider) AddConnectivity(cn *common.NodeConnectivity) (err error)

func (*SRv6Provider) CreateSRv6Tunnnel

func (p *SRv6Provider) CreateSRv6Tunnnel(dst net.IP, prefixDst ip_types.Prefix, policyTunnel *types.SrPolicy) (err error)

func (*SRv6Provider) DelConnectivity

func (p *SRv6Provider) DelConnectivity(cn *common.NodeConnectivity) (err error)

func (*SRv6Provider) Enabled

func (p *SRv6Provider) Enabled() bool

func (*SRv6Provider) GetSwifindexes

func (p *SRv6Provider) GetSwifindexes() []uint32

func (*SRv6Provider) OnVppRestart

func (p *SRv6Provider) OnVppRestart()

func (*SRv6Provider) RescanState

func (p *SRv6Provider) RescanState()

type VXLanProvider

type VXLanProvider struct {
	*ConnectivityProviderData
	// contains filtered or unexported fields
}

func NewVXLanProvider

func NewVXLanProvider(d *ConnectivityProviderData) *VXLanProvider

func (*VXLanProvider) AddConnectivity

func (p *VXLanProvider) AddConnectivity(cn *common.NodeConnectivity) error

func (*VXLanProvider) DelConnectivity

func (p *VXLanProvider) DelConnectivity(cn *common.NodeConnectivity) error

func (*VXLanProvider) Enabled

func (p *VXLanProvider) Enabled() bool

func (*VXLanProvider) OnVppRestart

func (p *VXLanProvider) OnVppRestart()

func (*VXLanProvider) RescanState

func (p *VXLanProvider) RescanState()

type WireguardProvider

type WireguardProvider struct {
	*ConnectivityProviderData
	// contains filtered or unexported fields
}

func (*WireguardProvider) AddConnectivity

func (p *WireguardProvider) AddConnectivity(cn *common.NodeConnectivity) error

func (*WireguardProvider) DelConnectivity

func (p *WireguardProvider) DelConnectivity(cn *common.NodeConnectivity) (err error)

func (*WireguardProvider) Enabled

func (p *WireguardProvider) Enabled() bool

func (*WireguardProvider) OnVppRestart

func (p *WireguardProvider) OnVppRestart()

func (*WireguardProvider) RescanState

func (p *WireguardProvider) RescanState()

func (*WireguardProvider) TunnelIsIP6

func (p *WireguardProvider) TunnelIsIP6() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL