Documentation ¶
Index ¶
- Variables
- func FindDisk() (string, bool)
- func GetBusybox()
- func GetOtherImage()
- func GetTestNetwork()
- func IsAliKernel() bool
- func IsCRIUExist() bool
- func IsDiskQuota() bool
- func IsDumbInitExist() bool
- func IsGrpquota() bool
- func IsHubConnected() bool
- func IsLinux() bool
- func IsLxcfsEnabled() bool
- func IsPrjquota() bool
- func IsRuncVersionSupportRichContianer() bool
- func PruneAllContainers(apiClient client.ContainerAPIClient) error
- func PruneAllImages(apiClient client.ImageAPIClient) error
- func PruneAllVolumes(apiClient client.VolumeAPIClient) error
- func SupportSystemdCgroupDriver() bool
Constants ¶
This section is empty.
Variables ¶
var ( // PouchBinary is default binary PouchBinary = "/usr/local/bin/pouch" // PouchdAddress is default pouchd address PouchdAddress = "unix:///var/run/pouchd.sock" // PouchdUnixDomainSock is the default unix domain socket file used by pouchd. PouchdUnixDomainSock = "/var/run/pouchd.sock" // TLSConfig is default tls config TLSConfig = client.TLSConfig{} // BusyboxRepo the repository of busybox image BusyboxRepo = "registry.hub.docker.com/library/busybox" // BusyboxTag the default tag used for busybox image BusyboxTag = "1.28" // BusyboxDigest the digest used for busybox image BusyboxDigest = "sha256:141c253bc4c3fd0a201d32dc1f493bcf3fff003b6df416dea4f41046e0f37d47" // BusyboxID the default ID for busybox image BusyboxID = "sha256:8c811b4aec35f259572d0f79207bc0678df4c736eeec50bc9fec37ed936a472a" // Busybox125Tag the 1.25 tag used for 1.25 busybox image Busybox125Tag = "1.25" // Busybox125Digest the digests used for 1.25 busybox image Busybox125Digest = "sha256:29f5d56d12684887bdfa50dcd29fc31eea4aaf4ad3bec43daf19026a7ce69912" // Busybox125ID the ID used for 1.25 busybox image Busybox125ID = "sha256:e02e811dd08fd49e7f6032625495118e63f597eb150403d02e3238af1df240ba" // HelloworldRepo the repository of hello-world image HelloworldRepo = "registry.hub.docker.com/library/hello-world" // HelloworldTag the tag used for hello-world image HelloworldTag = "linux" // HttpdRepo the repo for httpd image HttpdRepo = "registry.hub.docker.com/library/httpd" // HttpdTag the tag for httpd image HttpdTag = "2" // CniRepo the repo for cni image CniRepo = "calico/cni" // CniTag the tag for cni image CniTag = "v3.1.3" // GateWay default gateway for test GateWay = "192.168.1.1" // Subnet default subnet for test Subnet = "192.168.1.0/24" )
var ( // IsMemorySupport checks if memory cgroup is avaible IsMemorySupport = func() bool { return cgroupInfo.Memory.MemoryLimit } // IsMemoryReservationSupport checks if memory reservation cgroup is available IsMemoryReservationSupport = func() bool { return cgroupInfo.Memory.MemoryReservation } // IsMemorySwapSupport checks if memory swap cgroup is avaible IsMemorySwapSupport = func() bool { return cgroupInfo.Memory.MemorySwap } // IsMemorySwappinessSupport checks if memory swappiness cgroup is avaible IsMemorySwappinessSupport = func() bool { return cgroupInfo.Memory.MemorySwappiness } )
the following check funtions provide cgroup file avaible check
Functions ¶
func GetOtherImage ¶
func GetOtherImage()
GetOtherImage gets other image info from test environment variable.
func GetTestNetwork ¶
func GetTestNetwork()
GetTestNetwork get gateway and subnet from test environment variable.
func IsAliKernel ¶
func IsAliKernel() bool
IsAliKernel checks if the kernel of test environment is AliKernel.
func IsDiskQuota ¶
func IsDiskQuota() bool
IsDiskQuota checks if it can use disk quota for container.
func IsDumbInitExist ¶
func IsDumbInitExist() bool
IsDumbInitExist checks if the dumb-init binary exists on host.
func IsHubConnected ¶
func IsHubConnected() bool
IsHubConnected checks if hub address can be connected.
func IsLxcfsEnabled ¶
func IsLxcfsEnabled() bool
IsLxcfsEnabled checks if the lxcfs is installed and service is enabled.
func IsRuncVersionSupportRichContianer ¶
func IsRuncVersionSupportRichContianer() bool
IsRuncVersionSupportRichContianer checks if the version of runc supports rich container.
func PruneAllContainers ¶
func PruneAllContainers(apiClient client.ContainerAPIClient) error
PruneAllContainers deletes all containers from pouchd.
func PruneAllImages ¶
func PruneAllImages(apiClient client.ImageAPIClient) error
PruneAllImages deletes all images from pouchd.
func PruneAllVolumes ¶
func PruneAllVolumes(apiClient client.VolumeAPIClient) error
PruneAllVolumes deletes all volumes from pouchd
func SupportSystemdCgroupDriver ¶
func SupportSystemdCgroupDriver() bool
SupportSystemdCgroupDriver checks if systemd cgroup driver is available on machine.
Types ¶
This section is empty.