IPAM struct {
Type string `json:"type,omitempty"`
} `json:"ipam,omitempty"`
+ DNS DNS `json:"dns"`
}
// Result is what gets returned from the plugin (via stdout) to the caller
type Result struct {
IP4 *IPConfig `json:"ip4,omitempty"`
IP6 *IPConfig `json:"ip6,omitempty"`
- DNS []string `json:"dns,omitempty"`
+ DNS DNS `json:"dns,omitempty"`
}
func (r *Result) Print() error {
Routes []Route
}
+// DNS contains values interesting for DNS resolvers
+type DNS struct {
+ Nameservers []string `json:"nameservers,omitempty"`
+ Domain string `json:"domain,omitempty"`
+ Search []string `json:"search,omitempty"`
+ Options []string `json:"options,omitempty"`
+}
+
type Route struct {
Dst net.IPNet
GW net.IP
type NetConf struct {
types.NetConf
- BrName string `json:"bridge"`
- IsGW bool `json:"isGateway"`
- IPMasq bool `json:"ipMasq"`
- MTU int `json:"mtu"`
- DNS []string `json:"dns"`
+ BrName string `json:"bridge"`
+ IsGW bool `json:"isGateway"`
+ IPMasq bool `json:"ipMasq"`
+ MTU int `json:"mtu"`
}
func init() {
type NetConf struct {
types.NetConf
- Master string `json:"master"`
- Mode string `json:"mode"`
- MTU int `json:"mtu"`
- DNS []string `json:"dns"`
+ Master string `json:"master"`
+ Mode string `json:"mode"`
+ MTU int `json:"mtu"`
}
func init() {
type NetConf struct {
types.NetConf
- Master string `json:"master"`
- Mode string `json:"mode"`
- MTU int `json:"mtu"`
- DNS []string `json:"dns"`
+ Master string `json:"master"`
+ Mode string `json:"mode"`
+ MTU int `json:"mtu"`
}
func init() {
type NetConf struct {
types.NetConf
- IPMasq bool `json:"ipMasq"`
- MTU int `json:"mtu"`
- DNS []string `json:"dns"`
+ IPMasq bool `json:"ipMasq"`
+ MTU int `json:"mtu"`
}
func setupContainerVeth(netns, ifName string, mtu int, pr *types.Result) (string, error) {