vppdb

package
v0.0.0-...-b15e717 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupRemoteConfig

func CleanupRemoteConfig(conf *usrsptypes.NetConf, containerID string)

CleanupRemoteConfig() - When a config read on the host is for a Container,

the data to a file. This function cleans up the remaining files.

func FileCleanup

func FileCleanup(directory string, filepath string) (err error)

This function deletes the input file (if provided) and the associated directory (if provided) if the directory is empty.

directory string - Directory file is located in, Use "" if directory
  should remain unchanged.
filepath string - File (including directory) to be deleted. Use "" if
  only the directory should be deleted.

func FindRemoteConfig

func FindRemoteConfig() (bool, usrsptypes.NetConf, current.Result, string, error)

func LoadVppConfig

func LoadVppConfig(conf *usrsptypes.NetConf, containerID string, data *VppSavedData) error

func SaveRemoteConfig

func SaveRemoteConfig(conf *usrsptypes.NetConf, ipResult *current.Result, containerID string) error

saveRemoteConfig() - When a config read on the host is for a Container,

flip the location and write the data to a file. When the Container
comes up, it will read the file via () and delete the file. This function
writes the file.

func SaveVppConfig

func SaveVppConfig(conf *usrsptypes.NetConf, containerID string, data *VppSavedData) error

saveVppConfig() - Some data needs to be saved, like the swIfIndex, for cmdDel().

This function squirrels the data away to be retrieved later.

Types

type VppSavedData

type VppSavedData struct {
	SwIfIndex     uint32 `json:"swIfIndex"`     // Software Index, used to access the created interface, needed to delete interface.
	MemifSocketId uint32 `json:"memifSocketId"` // Memif SocketId, used to access the created memif Socket File, used for debug only.
}

This structure is a union of all the VPP data (for all types of interfaces) that need to be preserved for later use.

Jump to

Keyboard shortcuts

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