Documentation
¶
Index ¶
Constants ¶
View Source
const (
//CNIVersion is the cniVersion
CNIVersion = "0.4.0"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
CNIVersion string `json:"cniVersion"`
Name string `json:"name"`
Type string `json:"type"`
PreviousResult *Result `json:"prevResult,omitempty"`
Ipam *IpamConfig `json:"ipam"`
Args *Args `json:"args"`
}
Config represents the cni network config file
type DNS ¶
type DNS struct {
Nameservers []string `json:"nameservers,omitempty"`
Domain string `json:"domain,omitempty"`
Search []string `json:"search,omitempty"`
Options []string `json:"options,omitempty"`
}
DNS represents the DNS structure in the Result
type Error ¶
type Error struct {
Version string `json:"cniVersion"`
Code int `json:"code"`
Message string `json:"msg"`
Details string `json:"details,omitempty"`
}
Error represents the object we return to runtime in the case of a failure
func NewDetailedError ¶
NewDetailedError generates a new CNIError with details
type IP ¶
type IP struct {
Version string `json:"version"`
Address string `json:"address"`
Gateway string `json:"gateway,omitempty"`
Interface *int `json:"interface,omitempty"`
}
IP represents the ip address in the Result
type Interface ¶
type Interface struct {
Name string `json:"name"`
MAC string `json:"mac,omitempty"`
Sandbox string `json:"sandbox,omitempty"`
}
Interface represents the interface in the Result
type IpamConfig ¶
type IpamConfig struct {
Type string `json:"type"`
}
IpamConfig represents the cni ipam config
type Result ¶
type Result struct {
CNIVersion string `json:"cniVersion"`
Interfaces []*Interface `json:"interfaces,omitempty"`
IPs []*IP `json:"ips"`
Routes []*Route `json:"route,omitempty"`
DNS *DNS `json:"dns,omitempty"`
}
Result represents the cni result given back to the caller
type Vars ¶
type Vars struct {
Command string
NetworkNamespace string
ContainerInterface string
ContainerID string
Arguments string
Path string
// contains filtered or unexported fields
}
Vars represents the environment variables that the runtime should have populated
Click to show internal directories.
Click to hide internal directories.