Documentation ¶
Index ¶
Constants ¶
View Source
const ImplementedSpecVersion string = "1.1.0"
The types did not change between v1.0 and v1.1
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IPConfig ¶
type IPConfig struct { // Index into Result structs Interfaces list Interface *int Address net.IPNet Gateway net.IP }
IPConfig contains values necessary to configure an IP address on an interface
func (*IPConfig) MarshalJSON ¶
func (*IPConfig) UnmarshalJSON ¶
type Interface ¶
type Interface struct { Name string `json:"name"` Mac string `json:"mac,omitempty"` Mtu int `json:"mtu,omitempty"` Sandbox string `json:"sandbox,omitempty"` SocketPath string `json:"socketPath,omitempty"` PciID string `json:"pciID,omitempty"` }
Interface contains values about the created interfaces
type Result ¶
type Result struct { CNIVersion string `json:"cniVersion,omitempty"` Interfaces []*Interface `json:"interfaces,omitempty"` IPs []*IPConfig `json:"ips,omitempty"` Routes []*types.Route `json:"routes,omitempty"` DNS types.DNS `json:"dns,omitempty"` }
Result is what gets returned from the plugin (via stdout) to the caller
func (*Result) MarshalJSON ¶ added in v1.2.0
Note: DNS should be omit if DNS is empty but default Marshal function will output empty structure hence need to write a Marshal function
Click to show internal directories.
Click to hide internal directories.