Documentation ¶
Index ¶
- Variables
- func CmdAdd(cniNetns, cniContainerID, cniIfname string, conf []byte, f func() error) (types.Result, []byte, error)
- func CmdAddWithArgs(args *skel.CmdArgs, f func() error) (types.Result, []byte, error)
- func CmdCheck(cniNetns, cniContainerID, cniIfname string, conf []byte, f func() error) error
- func CmdCheckWithArgs(args *skel.CmdArgs, f func() error) error
- func CmdDel(cniNetns, cniContainerID, cniIfname string, f func() error) error
- func CmdDelWithArgs(args *skel.CmdArgs, f func() error) error
- func NewNS() (ns.NetNS, error)
- func Ping(saddr, daddr string, timeoutSec int) error
- func SpecVersionHasCHECK(ver string) bool
- func SpecVersionHasChaining(ver string) bool
- func SpecVersionHasIPVersion(ver string) bool
- func SpecVersionHasMultipleIPs(ver string) bool
- func TmpResolvConf(dnsConf types.DNS) (string, error)
- func UnmountNS(ns ns.NetNS) error
- type BadReader
Constants ¶
This section is empty.
Variables ¶
var AllSpecVersions = [...]string{"0.1.0", "0.2.0", "0.3.0", "0.3.1", "0.4.0", "1.0.0"}
AllSpecVersions contains all CNI spec version numbers
Functions ¶
func CmdAddWithArgs ¶ added in v0.8.0
func CmdCheckWithArgs ¶ added in v0.8.0
func NewNS ¶ added in v0.8.0
Creates a new persistent (bind-mounted) network namespace and returns an object representing that namespace, without switching to it.
func SpecVersionHasCHECK ¶ added in v1.0.0
SpecVersionHasCHECK returns true if the given CNI specification version supports the CHECK command
func SpecVersionHasChaining ¶ added in v1.0.0
SpecVersionHasChaining returns true if the given CNI specification version supports plugin chaining
func SpecVersionHasIPVersion ¶ added in v1.0.0
SpecVersionHasIPVersion returns true if the given CNI specification version includes the "version" field in the IP address elements
func SpecVersionHasMultipleIPs ¶ added in v1.0.0
SpecVersionHasMultipleIPs returns true if the given CNI specification version supports more than one IP address of each family
func TmpResolvConf ¶ added in v0.8.3
TmpResolvConf will create a temporary file and write the provided DNS settings to it in the resolv.conf format. It returns the path of the created temporary file or an error if any occurs while creating/writing the file. It is the caller's responsibility to remove the file.