Add delegate API in multus-daemon (#890)

This changes introduce delegate API function in multus-daemon.
This API will be consumed from other programs for hot-plug
interface into running pod. This change also cleanups server
code to split into client code and server code to easy to import
from other golang code.
This commit is contained in:
Tomofumi Hayashi
2022-08-10 00:45:23 +09:00
committed by GitHub
parent 8dee74d7b9
commit 505ab4567c
17 changed files with 409 additions and 183 deletions

View File

@@ -178,16 +178,6 @@ type ResourceClient interface {
GetPodResourceMap(*v1.Pod) (map[string]*ResourceInfo, error)
}
// ShimNetConf for the SHIM cni config file written in json
type ShimNetConf struct {
types.NetConf
MultusSocketDir string `json:"socketDir"`
LogFile string `json:"logFile,omitempty"`
LogLevel string `json:"logLevel,omitempty"`
LogToStderr bool `json:"logToStderr,omitempty"`
}
// ControllerNetConf for the controller cni configuration
type ControllerNetConf struct {
ChrootDir string `json:"chrootDir,omitempty"`