ifnames

package
v1.14.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ifnames provides caching facilty for ovs port info using metadata store. This is mainly used by mechanism and l2ovsconnect chain elements

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, isClient bool)

Delete deletes a specific ovsPortInfo from cache

func Store

func Store(ctx context.Context, isClient bool, ovsPortInfo *OvsPortInfo)

Store stores ovsPortInfo for the given cross connect, isClient identfies which connection it is.

Types

type OvsPortInfo

type OvsPortInfo struct {
	PortName         string
	PortNo           int
	VlanID           uint32
	IsTunnelPort     bool
	IsVfRepresentor  bool
	IsCrossConnected bool
	IsL2Connect      bool
	VNI              uint32
}

OvsPortInfo ovs port info container

func Load

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

Load retrieves ovsPortInfo from cache for a given connection

func LoadAndDelete

func LoadAndDelete(ctx context.Context, isClient bool) (value *OvsPortInfo, ok bool)

LoadAndDelete retrievs ovsPortInfo from cache and also also delete it from the cache.

func LoadOrStore

func LoadOrStore(ctx context.Context, isClient bool, ovsPortInfo *OvsPortInfo) (value *OvsPortInfo, ok bool)

LoadOrStore retrievs ovsPortInfo from cache. If it doesn't exist, store it with given ovsPortInfo

Jump to

Keyboard shortcuts

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