Documentation ¶
Index ¶
Constants ¶
View Source
const CNIServerConfigFileName string = "config.json"
Config file containing MTU, and default full path
View Source
const CNIServerConfigFilePath string = CNIServerRunDir + "/" + CNIServerConfigFileName
View Source
const CNIServerRunDir string = "/var/run/openshift-sdn"
Default directory for CNIServer runtime files
View Source
const CNIServerSocketName string = "cni-server.sock"
CNIServer socket name, and default full path
View Source
const CNIServerSocketPath string = CNIServerRunDir + "/" + CNIServerSocketName
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CNICommand ¶
type CNICommand string
Explicit type for CNI commands the server handles
const CNI_ADD CNICommand = "ADD"
const CNI_DEL CNICommand = "DEL"
const CNI_UPDATE CNICommand = "UPDATE"
type CNIRequest ¶
type CNIRequest struct { // CNI environment variables, like CNI_COMMAND and CNI_NETNS Env map[string]string `json:"env,omitempty"` // CNI configuration passed via stdin to the CNI plugin Config []byte `json:"config,omitempty"` }
Request sent to the CNIServer by the OpenShift SDN CNI plugin
type CNIServer ¶
CNI server object that listens for JSON-marshaled CNIRequest objects on a private root-only Unix domain socket.
func NewCNIServer ¶
Create and return a new CNIServer object which will listen on a socket in the given path
type Config ¶
type Config struct {
MTU uint32 `json:"mtu"`
}
Server-to-plugin config data
func ReadConfig ¶
type PodRequest ¶
type PodRequest struct { // The CNI command of the operation Command CNICommand // kubernetes namespace name PodNamespace string // kubernetes pod name PodName string // kubernetes container ID SandboxID string // kernel network namespace path Netns string // for an ADD request, the host side of the created veth HostVeth string // Channel for returning the operation result to the CNIServer Result chan *PodResult }
Request structure built from CNIRequest which is passed to the handler function given to the CNIServer at creation time
Click to show internal directories.
Click to hide internal directories.