Documentation ¶
Overview ¶
Package loopback provides networkservice.NetworkService chain elements for creating loopback interface
Index ¶
- func Delete(ctx context.Context, isClient bool)
- func Load(ctx context.Context, isClient bool) (value interface_types.InterfaceIndex, ok bool)
- func LoadAndDelete(ctx context.Context, isClient bool) (value interface_types.InterfaceIndex, ok bool)
- func LoadOrStore(ctx context.Context, isClient bool, swIfIndex interface_types.InterfaceIndex) (value interface_types.InterfaceIndex, 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 bool, swIfIndex interface_types.InterfaceIndex)
- type Map
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load(ctx context.Context, isClient bool) (value interface_types.InterfaceIndex, ok bool)
Load returns the swIfIndex 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 ¶
func LoadAndDelete(ctx context.Context, isClient bool) (value interface_types.InterfaceIndex, ok bool)
LoadAndDelete deletes the swIfIndex stored in per Connection.Id metadata, returning the previous value if any. The loaded result reports whether the key was present.
func LoadOrStore ¶
func LoadOrStore(ctx context.Context, isClient bool, swIfIndex interface_types.InterfaceIndex) (value interface_types.InterfaceIndex, ok bool)
LoadOrStore returns the existing swIfIndex stored in per Connection.Id metadata if present. Otherwise, it stores and returns the given swIfIndex. 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 loopback vpp-interface
func NewServer ¶
func NewServer(vppConn api.Connection, opts ...Option) networkservice.NetworkServiceServer
NewServer creates a NetworkServiceServer chain element to create the loopback vpp-interface
func Store ¶
func Store(ctx context.Context, isClient bool, swIfIndex interface_types.InterfaceIndex)
Store sets the loopback swIfIndex stored in per Connection.Id metadata.