vrf

package
v0.0.3-pre4.0...-0ec3cfc Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

func ParseHumanReadableRouteDistinguisher(x string) (uint64, error)

ParseHumanReadableRouteDistinguisher parses a human readable route distinguisher

func RouteDistinguisherHumanReadable

func RouteDistinguisherHumanReadable(rdi uint64) string

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 GetVRFByRD

func GetVRFByRD(rd uint64) *VRF

GetVRFByRD gets a VRF by it's Route Distinguisher

func New

func New(name string, rd uint64) (*VRF, error)

New creates a new VRF. The VRF is registered automatically to the global VRF registry.

func (*VRF) CreateIPv4UnicastLocRIB

func (v *VRF) CreateIPv4UnicastLocRIB(name string) (*locRIB.LocRIB, error)

CreateIPv4UnicastLocRIB creates a LocRIB for the IPv4 unicast address family

func (*VRF) CreateIPv6UnicastLocRIB

func (v *VRF) CreateIPv6UnicastLocRIB(name string) (*locRIB.LocRIB, error)

CreateIPv6UnicastLocRIB creates a LocRIB for the IPv6 unicast address family

func (*VRF) Dispose

func (v *VRF) Dispose()

Dispose drops all referenes to all RIBs within a VRF

func (*VRF) IPv4UnicastRIB

func (v *VRF) IPv4UnicastRIB() *locRIB.LocRIB

IPv4UnicastRIB returns the local RIB for the IPv4 unicast address family

func (*VRF) IPv6UnicastRIB

func (v *VRF) IPv6UnicastRIB() *locRIB.LocRIB

IPv6UnicastRIB returns the local RIB for the IPv6 unicast address family

func (*VRF) Name

func (v *VRF) Name() string

Name is the name of the VRF

func (*VRF) RD

func (v *VRF) RD() uint64

RD returns the route distinguisher of the VRF

func (*VRF) RIBByName

func (v *VRF) RIBByName(name string) (rib *locRIB.LocRIB, found bool)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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