Documentation ¶
Index ¶
- Constants
- Variables
- func CompareIPList(newIPList, oldIPList []net.IP) (added []net.IP, deleted []net.IP, changed bool)
- func CreateVppLink(socket string, log *logrus.Entry) (vpp *vpplink.VppLink, err error)
- func CreateVppLinkInRetryLoop(socket string, log *logrus.Entry, timeout time.Duration, retry time.Duration) (vpp *vpplink.VppLink, err error)
- func FetchNDataThreads(vpp *vpplink.VppLink, log *logrus.Entry) int
- func FormatBGPConfiguration(conf *calicov3.BGPConfigurationSpec) string
- func FormatSlice(lst []interface{ ... }) string
- func FullyQualified(addr net.IP) *net.IPNet
- func GetAggPrefixSetName(isv6 bool) string
- func GetBGPSpecAddresses(nodeBGPSpec *LocalNodeSpec) (ip4 *net.IP, ip6 *net.IP)
- func GetHostPrefixSetName(isv6 bool) string
- func GetMaxCIDRMask(addr net.IP) net.IPMask
- func GetPolicyName(isv6 bool) string
- func IsFullyQualified(cidr *net.IPNet) bool
- func IsV6Cidr(cidr *net.IPNet) bool
- func MakePath(prefix string, isWithdrawal bool, nodeIpv4 *net.IP, nodeIpv6 *net.IP, ...) (*bgpapi.Path, error)
- func MakePathSRv6Tunnel(localSid net.IP, bSid net.IP, nodeIpv6 net.IP, trafficType int, ...) (*bgpapi.Path, error)
- func SafeFormat(e interface{ ... }) string
- func SendEvent(event CalicoVppEvent)
- func ToMaxLenCIDR(addr net.IP) *net.IPNet
- func WaitForVppManager() (*config.VppManagerInfo, error)
- func WritePidToFile() error
- type CalicoVppEvent
- type CalicoVppEventType
- type ChangeType
- type LocalNodeSpec
- type NodeConnectivity
- type NodeWireguardPublicKey
- type PolicyServerIpam
- type PubSub
- type PubSubHandlerRegistration
- type SRv6Tunnel
Constants ¶
View Source
const ( DefaultVRFIndex = uint32(0) PuntTableId = uint32(1) PodVRFIndex = uint32(2) )
Variables ¶
View Source
var (
ContainerSideMacAddress, _ = net.ParseMAC("02:00:00:00:00:01")
VppManagerInfo *config.VppManagerInfo
)
View Source
var ( BgpFamilyUnicastIPv4VPN = bgpapi.Family{Afi: bgpapi.Family_AFI_IP, Safi: bgpapi.Family_SAFI_MPLS_VPN} BgpFamilyUnicastIPv6VPN = bgpapi.Family{Afi: bgpapi.Family_AFI_IP6, Safi: bgpapi.Family_SAFI_MPLS_VPN} BgpFamilyUnicastIPv4 = bgpapi.Family{Afi: bgpapi.Family_AFI_IP, Safi: bgpapi.Family_SAFI_UNICAST} BgpFamilySRv6IPv4 = bgpapi.Family{Afi: bgpapi.Family_AFI_IP, Safi: bgpapi.Family_SAFI_SR_POLICY} BgpFamilyUnicastIPv6 = bgpapi.Family{Afi: bgpapi.Family_AFI_IP6, Safi: bgpapi.Family_SAFI_UNICAST} BgpFamilySRv6IPv6 = bgpapi.Family{Afi: bgpapi.Family_AFI_IP6, Safi: bgpapi.Family_SAFI_SR_POLICY} )
Functions ¶
func CompareIPList ¶
func CreateVppLink ¶
CreateVppLink creates new link to VPP and waits for VPP to be up and running (by using simple VPP API call)
func CreateVppLinkInRetryLoop ¶
func CreateVppLinkInRetryLoop(socket string, log *logrus.Entry, timeout time.Duration, retry time.Duration) (vpp *vpplink.VppLink, err error)
CreateVppLinkInRetryLoop creates new link to VPP and waits for VPP to be up and running (by using simple VPP API call). This process is retried in a loop and has a timeout limit.
func FormatBGPConfiguration ¶ added in v3.25.1
func FormatBGPConfiguration(conf *calicov3.BGPConfigurationSpec) string
func FormatSlice ¶
func GetAggPrefixSetName ¶
func GetBGPSpecAddresses ¶
func GetBGPSpecAddresses(nodeBGPSpec *LocalNodeSpec) (ip4 *net.IP, ip6 *net.IP)
func GetHostPrefixSetName ¶
func GetPolicyName ¶
func IsFullyQualified ¶ added in v3.25.1
func MakePathSRv6Tunnel ¶
func SafeFormat ¶
func SendEvent ¶
func SendEvent(event CalicoVppEvent)
func WaitForVppManager ¶
func WaitForVppManager() (*config.VppManagerInfo, error)
func WritePidToFile ¶
func WritePidToFile() error
Types ¶
type CalicoVppEvent ¶
type CalicoVppEvent struct { Type CalicoVppEventType Old interface{} New interface{} }
type CalicoVppEventType ¶
type CalicoVppEventType string
const ( ChanSize = 500 PeerNodeStateChanged CalicoVppEventType = "PeerNodeStateChanged" FelixConfChanged CalicoVppEventType = "FelixConfChanged" IpamConfChanged CalicoVppEventType = "IpamConfChanged" BGPConfChanged CalicoVppEventType = "BGPConfChanged" ConnectivityAdded CalicoVppEventType = "ConnectivityAdded" ConnectivityDeleted CalicoVppEventType = "ConnectivityDeleted" SRv6PolicyAdded CalicoVppEventType = "SRv6PolicyAdded" SRv6PolicyDeleted CalicoVppEventType = "SRv6PolicyDeleted" PodAdded CalicoVppEventType = "PodAdded" PodDeleted CalicoVppEventType = "PodDeleted" LocalPodAddressAdded CalicoVppEventType = "LocalPodAddressAdded" LocalPodAddressDeleted CalicoVppEventType = "LocalPodAddressDeleted" TunnelAdded CalicoVppEventType = "TunnelAdded" TunnelDeleted CalicoVppEventType = "TunnelDeleted" BGPPeerAdded CalicoVppEventType = "BGPPeerAdded" BGPPeerDeleted CalicoVppEventType = "BGPPeerDeleted" BGPPeerUpdated CalicoVppEventType = "BGPPeerUpdated" BGPSecretChanged CalicoVppEventType = "BGPSecretChanged" BGPFilterAddedOrUpdated CalicoVppEventType = "BGPFilterAddedOrUpdated" BGPFilterDeleted CalicoVppEventType = "BGPFilterDeleted" BGPDefinedSetAdded CalicoVppEventType = "BGPDefinedSetAdded" BGPDefinedSetDeleted CalicoVppEventType = "BGPDefinedSetDeleted" BGPPathAdded CalicoVppEventType = "BGPPathAdded" BGPPathDeleted CalicoVppEventType = "BGPPathDeleted" NetAddedOrUpdated CalicoVppEventType = "NetAddedOrUpdated" NetDeleted CalicoVppEventType = "NetDeleted" NetsSynced CalicoVppEventType = "NetsSynced" IpamPoolUpdate CalicoVppEventType = "IpamPoolUpdate" IpamPoolRemove CalicoVppEventType = "IpamPoolRemove" WireguardPublicKeyChanged CalicoVppEventType = "WireguardPublicKeyChanged" )
type ChangeType ¶
type ChangeType int
const ( ChangeSame ChangeType = 0 ChangeAdded ChangeType = 1 ChangeDeleted ChangeType = 2 ChangeUpdated ChangeType = 4 )
*
- Change types are flags so that you can check for multiple
- fields changing with an OR
func GetIpNetChangeType ¶ added in v3.25.1
func GetIpNetChangeType(old, new *net.IPNet) ChangeType
func GetStringChangeType ¶
func GetStringChangeType(old, new string) ChangeType
type LocalNodeSpec ¶ added in v3.25.1
type NodeConnectivity ¶
type NodeConnectivity struct { Dst net.IPNet NextHop net.IP ResolvedProvider string Custom interface{} Vni uint32 }
func (*NodeConnectivity) String ¶
func (cn *NodeConnectivity) String() string
type NodeWireguardPublicKey ¶ added in v3.25.1
type PolicyServerIpam ¶ added in v3.25.1
type PubSub ¶
type PubSub struct {
// contains filtered or unexported fields
}
var (
ThePubSub *PubSub
)
type PubSubHandlerRegistration ¶
type PubSubHandlerRegistration struct {
// contains filtered or unexported fields
}
func RegisterHandler ¶
func RegisterHandler(channel chan CalicoVppEvent, name string) *PubSubHandlerRegistration
func (*PubSubHandlerRegistration) ExpectEvents ¶
func (reg *PubSubHandlerRegistration) ExpectEvents(eventTypes ...CalicoVppEventType)
Click to show internal directories.
Click to hide internal directories.