Documentation
¶
Index ¶
- Constants
- Variables
- func CreateVppLink(socket string, log *logrus.Entry) (vpp *vpplink.VppLink, err error)
- func FormatSlice(lst []interface{ ... }) string
- func FullyQualified(addr net.IP) *net.IPNet
- func GetAggPrefixSetName(isv6 bool) string
- func GetBGPSpecAddresses(nodeBGPSpec *oldv3.NodeBGPSpec) (*net.IP, *net.IP)
- func GetBGPSpecIPNet(nodeBGPSpec *oldv3.NodeBGPSpec) (ip4 *net.IPNet, ip6 *net.IPNet)
- func GetHostPrefixSetName(isv6 bool) string
- func GetMaxCIDRMask(addr net.IP) net.IPMask
- func GetNodeSpecAddresses(node *oldv3.Node) (string, string)
- func GetPolicyName(isv6 bool) string
- func GetVppTapSwifIndex() (swIfIndex uint32, err error)
- func HandleVppManagerRestart(log *logrus.Logger, vpp *vpplink.VppLink, servers []CalicoVppServer)
- func InitRestartHandler()
- 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() error
- func WaitIfVppIsRestarting()
- func WritePidToFile() error
- type CalicoVppEvent
- type CalicoVppEventType
- type CalicoVppServer
- type CalicoVppServerData
- type ChangeType
- type NodeConnectivity
- type NodeState
- type PubSub
- type PubSubHandlerRegistration
- type SRv6Tunnel
Constants ¶
View Source
const ( DefaultVRFIndex = uint32(0) PuntTableId = uint32(1) PodVRFIndex = uint32(2) )
Variables ¶
View Source
var ( 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} )
View Source
var (
ContainerSideMacAddress, _ = net.ParseMAC("02:00:00:00:00:01")
)
Functions ¶
func CreateVppLink ¶
func FormatSlice ¶
func GetAggPrefixSetName ¶
func GetBGPSpecAddresses ¶
func GetBGPSpecIPNet ¶
func GetHostPrefixSetName ¶
func GetPolicyName ¶
func GetVppTapSwifIndex ¶
This function and the related mechanism in vpmanager are curently kept around in case they're useful for the Host Endpoint policies implementation
func HandleVppManagerRestart ¶
func HandleVppManagerRestart(log *logrus.Logger, vpp *vpplink.VppLink, servers []CalicoVppServer)
func InitRestartHandler ¶
func InitRestartHandler()
func MakePathSRv6Tunnel ¶
func SafeFormat ¶
func SendEvent ¶
func SendEvent(event CalicoVppEvent)
func WaitForVppManager ¶
func WaitForVppManager() error
func WaitIfVppIsRestarting ¶
func WaitIfVppIsRestarting()
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" OurNodeStateChanged CalicoVppEventType = "OurNodeStateChanged" 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" BGPDefinedSetAdded CalicoVppEventType = "BGPDefinedSetAdded" BGPDefinedSetDeleted CalicoVppEventType = "BGPDefinedSetDeleted" BGPPathAdded CalicoVppEventType = "BGPPathAdded" BGPPathDeleted CalicoVppEventType = "BGPPathDeleted" BGPReloadIP4 CalicoVppEventType = "BGPReloadIP4" BGPReloadIP6 CalicoVppEventType = "BGPReloadIP6" )
type CalicoVppServer ¶
type CalicoVppServer interface {
/* Called when VPP signals us that it has restarted */
OnVppRestart()
}
type CalicoVppServerData ¶
type CalicoVppServerData struct{}
type ChangeType ¶
type ChangeType int
const ( ChangeNone ChangeType = iota ChangeSame ChangeType = iota ChangeAdded ChangeType = iota ChangeDeleted ChangeType = iota ChangeUpdated ChangeType = iota )
func GetStringChangeType ¶
func GetStringChangeType(old, new string) ChangeType
type NodeConnectivity ¶
type NodeConnectivity struct { Dst net.IPNet NextHop net.IP ResolvedProvider string Custom interface{} }
func (*NodeConnectivity) String ¶
func (cn *NodeConnectivity) String() string
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.