up

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 20 Imported by: 5

Documentation

Overview

Package up provides chain elements to 'up' interfaces (and optionally wait for them to come up)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, isClient bool)

Delete deletes the bool indicating that the chain element should wait for the swIfIndex to be up, stored in per Connection.Id metadata

func Load

func Load(ctx context.Context, isClient bool) (value, ok bool)

Load returns the bool indicating that the chain element should wait for the swIfIndex to be up, 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, ok bool)

LoadAndDelete deletes the bool indicating that the chain element should wait for the swIfIndex to be up, 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, waitTillUp bool) (value, ok bool)

LoadOrStore returns the existing bool indicating that the chain element should wait for the swIfIndex to be up, stored in per Connection.Id metadata if present. Otherwise, it stores and returns the given nterface_types.InterfaceIndex. The loaded result is true if the value was loaded, false if stored.

func NewClient

func NewClient(ctx context.Context, vppConn api.Connection, opts ...Option) networkservice.NetworkServiceClient

NewClient provides a NetworkServiceClient chain elements that 'up's the swIfIndex

func NewServer

func NewServer(ctx context.Context, vppConn api.Connection, opts ...Option) networkservice.NetworkServiceServer

NewServer provides a NetworkServiceServer chain elements that 'up's the swIfIndex

func Store

func Store(ctx context.Context, isClient, waitTillUp bool)

Store sets the bool indicating that the chain element should wait for the swIfIndex to be up, stored in per Connection.Id metadata.

Types

type Option added in v1.1.0

type Option func(o *options)

Option is an option pattern for upClient/Server

func WithLoadSwIfIndex added in v1.1.0

func WithLoadSwIfIndex(f ifIndexFunc) Option

WithLoadSwIfIndex - sets function to load the interface index

Directories

Path Synopsis
Package ipsecup provides chain elements that wait the 'up' of the IPSec interface
Package ipsecup provides chain elements that wait the 'up' of the IPSec interface
Package peerup provides chain elements to 'up' peer
Package peerup provides chain elements to 'up' peer

Jump to

Keyboard shortcuts

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