Documentation ¶
Index ¶
- Constants
- func Metrics(r *VRFRegistry) []*metrics.VRFMetrics
- func MetricsForVRF(v *VRF) *metrics.VRFMetrics
- func ParseHumanReadableRouteDistinguisher(x string) (uint64, error)
- func RouteDistinguisherHumanReadable(rdi uint64) string
- type VRF
- func (v *VRF) AddContributingASN(asn uint32)
- func (v *VRF) AddContributingClusterID(cid uint32)
- func (v *VRF) CreateIPv4UnicastLocRIB(name string) (*locRIB.LocRIB, error)
- func (v *VRF) CreateIPv6UnicastLocRIB(name string) (*locRIB.LocRIB, error)
- func (v *VRF) Dispose()
- func (v *VRF) IPv4UnicastRIB() *locRIB.LocRIB
- func (v *VRF) IPv6UnicastRIB() *locRIB.LocRIB
- func (v *VRF) IsContributingASN(asn uint32) bool
- func (v *VRF) IsContributingClusterID(cid uint32) bool
- func (v *VRF) Name() string
- func (v *VRF) RD() uint64
- func (v *VRF) RIBByName(name string) (rib *locRIB.LocRIB, found bool)
- func (v *VRF) RemoveContributingASN(asn uint32)
- func (v *VRF) RemoveContributingClusterID(cid uint32)
- func (v *VRF) Unregister()
- type VRFRegistry
Constants ¶
const DefaultVRFName = "main"
Variables ¶
This section is empty.
Functions ¶
func Metrics ¶
func Metrics(r *VRFRegistry) []*metrics.VRFMetrics
Metrics returns metrics for all VRFs
func MetricsForVRF ¶
func MetricsForVRF(v *VRF) *metrics.VRFMetrics
func ParseHumanReadableRouteDistinguisher ¶
ParseHumanReadableRouteDistinguisher parses a human readable route distinguisher
func RouteDistinguisherHumanReadable ¶
RouteDistinguisherHumanReadable converts 64bit route distinguisher to human readable string form
Types ¶
type VRF ¶
type VRF struct {
// contains filtered or unexported fields
}
VRF a list of RIBs for different address families building a routing instance
func NewUntrackedVRF ¶ added in v0.1.8
func (*VRF) AddContributingASN ¶ added in v0.1.8
AddContributingASN adds the given ASN to the list of ASNs is used by this BGP speaker somewhere within this VRF
func (*VRF) AddContributingClusterID ¶ added in v0.1.8
AddContributingASN adds the given ClusterID to the list of ClusterIDs is used by this BGP speaker somewhere within this VRF
func (*VRF) CreateIPv4UnicastLocRIB ¶
CreateIPv4UnicastLocRIB creates a LocRIB for the IPv4 unicast address family
func (*VRF) CreateIPv6UnicastLocRIB ¶
CreateIPv6UnicastLocRIB creates a LocRIB for the IPv6 unicast address family
func (*VRF) IPv4UnicastRIB ¶
IPv4UnicastRIB returns the local RIB for the IPv4 unicast address family
func (*VRF) IPv6UnicastRIB ¶
IPv6UnicastRIB returns the local RIB for the IPv6 unicast address family
func (*VRF) IsContributingASN ¶ added in v0.1.8
IsContributingASN returns wether the given ASN is used by this BGP speaker somewhere within this VRF
func (*VRF) IsContributingClusterID ¶ added in v0.1.8
IsContributingASN returns wether the given ClusterID is used by this BGP speaker somewhere within this VRF
func (*VRF) RIBByName ¶
RIBByName returns the RIB for a given name. If there is no RIB with this name, found is false
func (*VRF) RemoveContributingASN ¶ added in v0.1.8
RemoveContributingASN removes the given ASN from the list of ASNs is used by this BGP speaker somewhere within this VRF
func (*VRF) RemoveContributingClusterID ¶ added in v0.1.8
RemoveContributingASN removes the given ClusterID from the list of ClusterIDs is used by this BGP speaker somewhere within this VRF
func (*VRF) Unregister ¶
func (v *VRF) Unregister()
Unregister removes this VRF from the global registry.
type VRFRegistry ¶
type VRFRegistry struct {
// contains filtered or unexported fields
}
VRFRegistry holds a reference to all active VRFs. Every VRF have to have a different name.
func GetGlobalRegistry ¶
func GetGlobalRegistry() *VRFRegistry
GetGlobalRegistry gets the global registry
func NewVRFRegistry ¶
func NewVRFRegistry() *VRFRegistry
func (*VRFRegistry) CreateVRFIfNotExists ¶
func (r *VRFRegistry) CreateVRFIfNotExists(name string, rd uint64) *VRF
func (*VRFRegistry) GetVRFByName ¶
func (r *VRFRegistry) GetVRFByName(name string) *VRF
GetVRFByRD gets a VRF by route distinguisher
func (*VRFRegistry) List ¶
func (r *VRFRegistry) List() []*VRF
func (*VRFRegistry) UnregisterVRF ¶
func (r *VRFRegistry) UnregisterVRF(v *VRF)
unregisterVRF removes the given VRF from the registry.