Documentation ¶
Index ¶
- Constants
- func Cmd(cmd string) string
- func CmdWithStdin(cmd, stdin_string string) string
- func CreateContainer(netconf string, k8sName string, ip string) (container_id, netnspath string, session *gexec.Session, contVeth netlink.Link, ...)
- func CreateContainerNamespace() (containerNs ns.NetNS, containerId, netnspath string, err error)
- func CreateContainerNamespaceWithCid(container_id string) (containerNs ns.NetNS, containerId, netnspath string, err error)
- func CreateContainerWithId(netconf string, k8sName string, ip string, containerId string) (container_id, netnspath string, session *gexec.Session, contVeth netlink.Link, ...)
- func CreateHostVeth(containerId string, k8sName string, k8sNamespace string) error
- func DeleteContainer(netconf, netnspath, name string) (exitCode int, err error)
- func DeleteContainerWithId(netconf, netnspath, name, containerId string) (exitCode int, err error)
- func GetResultForCurrent(session *gexec.Session, cniVersion string) (*current.Result, error)
- func RunIPAMPlugin(netconf, command, args, cniVersion string) (*current.Result, types.Error, int)
- func WipeEtcd()
- func WipeK8sPods()
Constants ¶
View Source
const K8S_TEST_NS = "test"
Variables ¶
This section is empty.
Functions ¶
func CmdWithStdin ¶
func CreateContainer ¶
func CreateContainerNamespace ¶ added in v1.6.1
func CreateContainerNamespaceWithCid ¶ added in v1.7.0
func CreateContainerWithId ¶ added in v1.7.0
func CreateContainerWithId(netconf string, k8sName string, ip string, containerId string) (container_id, netnspath string, session *gexec.Session, contVeth netlink.Link, contAddr []netlink.Addr, contRoutes []netlink.Route, err error)
Create container with the giving containerId when containerId is not empty
func CreateHostVeth ¶ added in v1.7.0
Create veth pair on host
func DeleteContainer ¶
Executes the Calico CNI plugin and return the error code of the command.
func DeleteContainerWithId ¶ added in v1.7.0
func GetResultForCurrent ¶ added in v1.7.0
GetResultForCurrent takes the session output with cniVersion and returns the Result in current.Result format.
func RunIPAMPlugin ¶
RunIPAMPlugin sets ENV vars required then calls the IPAM plugin specified in the config and returns the result and exitCode.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.