Documentation ¶
Overview ¶
Package vrf provides networkservice.NetworkService chain elements for vrf creating
Index ¶
- func Delete(ctx context.Context, isClient, isIPv6 bool)
- func Load(ctx context.Context, isClient, isIPv6 bool) (value uint32, ok bool)
- func LoadAndDelete(ctx context.Context, isClient, isIPv6 bool) (value uint32, ok bool)
- func LoadOrStore(ctx context.Context, isClient, isIPv6 bool, vrfID uint32) (value uint32, ok bool)
- func NewClient(vppConn api.Connection, opts ...Option) networkservice.NetworkServiceClient
- func NewServer(vppConn api.Connection, opts ...Option) networkservice.NetworkServiceServer
- func Store(ctx context.Context, isClient, isIPv6 bool, vrfID uint32)
- type Map
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
Load returns the vrfID stored in per Connection.Id metadata, or nil if no value is present. The ok result indicates whether value was found in the per Connection.Id metadata.
func LoadAndDelete ¶
LoadAndDelete deletes the vrfID stored in per Connection.Id metadata, returning the previous value if any. The loaded result reports whether the key was present.
func LoadOrStore ¶
LoadOrStore returns the existing vrfID stored in per Connection.Id metadata if present. Otherwise, it stores and returns the given vrfID. The loaded result is true if the value was loaded, false if stored.
func NewClient ¶
func NewClient(vppConn api.Connection, opts ...Option) networkservice.NetworkServiceClient
NewClient creates a NetworkServiceClient chain element to create the ip table in vpp
func NewServer ¶
func NewServer(vppConn api.Connection, opts ...Option) networkservice.NetworkServiceServer
NewServer creates a NetworkServiceServer chain element to create the ip table in vpp
Types ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map contains ipv6 and ipv4 vrf entries.
type Option ¶
type Option func(o *options)
Option is an option pattern for upClient/Server
func WithLoadInterface ¶
func WithLoadInterface(loadFn ifindex.LoadInterfaceFn) Option
WithLoadInterface replaces for for loading iface to attach the vrf table.
func WithSharedMap ¶
WithSharedMap - sets shared vrfV4 and vrfV6 map.