Documentation ¶
Index ¶
- 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) 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) Name() string
- func (v *VRF) RD() uint64
- func (v *VRF) RIBByName(name string) (rib *locRIB.LocRIB, found bool)
- func (v *VRF) Unregister()
- type VRFRegistry
Constants ¶
This section is empty.
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 (*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) RIBByName ¶
RIBByName returns the RIB for a given name. If there is no RIB with this name, found is false
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) GetVRFByRD ¶
func (r *VRFRegistry) GetVRFByRD(rd uint64) *VRF
GetVRFByRD gets a VRF by route distinguisher
func (*VRFRegistry) List ¶
func (r *VRFRegistry) List() []*VRF
func (*VRFRegistry) UnregisterAll ¶
func (r *VRFRegistry) UnregisterAll()
UnregisterAll unregisters all VRFs
func (*VRFRegistry) UnregisterVRF ¶
func (r *VRFRegistry) UnregisterVRF(v *VRF)
unregisterVRF removes the given VRF from the registry.