Documentation ¶
Index ¶
- func CleanupRemoteConfig(conf *usrsptypes.NetConf, containerID string)
- func FileCleanup(directory string, filepath string) (err error)
- func FindRemoteConfig() (bool, usrsptypes.NetConf, current.Result, string, error)
- func LoadVppConfig(conf *usrsptypes.NetConf, containerID string, data *VppSavedData) error
- func SaveRemoteConfig(conf *usrsptypes.NetConf, ipResult *current.Result, containerID string) error
- func SaveVppConfig(conf *usrsptypes.NetConf, containerID string, data *VppSavedData) error
- type VppSavedData
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 ¶
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 LoadVppConfig ¶
func LoadVppConfig(conf *usrsptypes.NetConf, containerID string, data *VppSavedData) error
func SaveRemoteConfig ¶
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.
Click to show internal directories.
Click to hide internal directories.