Documentation ¶
Index ¶
Constants ¶
View Source
const CNIServerSocketPath string = "/var/run/openshift-sdn/cni-server.sock"
Default CNIServer unix domain socket path which the OpenShift SDN CNI plugin uses to talk to the CNIServer
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 the given socket path
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 ContainerId string // kernel network namespace path Netns 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.