Fix golint warning on pkg/sysinfo

Signed-off-by: Hu Keping <hukeping@huawei.com>
This commit is contained in:
Hu Keping 2015-07-22 18:31:34 +08:00
parent 8cd8bc1365
commit 001fc3cf5f
4 changed files with 41 additions and 21 deletions

View file

@ -3,23 +3,43 @@ package sysinfo
// SysInfo stores information about which features a kernel supports.
// TODO Windows: Factor out platform specific capabilities.
type SysInfo struct {
// Whether the kernel supports AppArmor or not
AppArmor bool
*cgroupMemInfo
*cgroupCpuInfo
IPv4ForwardingDisabled bool
BridgeNfCallIptablesDisabled bool
BridgeNfCallIp6tablesDisabled bool
CgroupDevicesEnabled bool
*cgroupCPUInfo
// Whether IPv4 forwarding is supported or not, if this was disabled, networking will not work
IPv4ForwardingDisabled bool
// Whether bridge-nf-call-iptables is supported or not
BridgeNfCallIptablesDisabled bool
// Whether bridge-nf-call-ip6tables is supported or not
BridgeNfCallIP6tablesDisabled bool
// Whether the cgroup has the mountpoint of "devices" or not
CgroupDevicesEnabled bool
}
type cgroupMemInfo struct {
MemoryLimit bool
SwapLimit bool
OomKillDisable bool
// Whether memory limit is supported or not
MemoryLimit bool
// Whether swap limit is supported or not
SwapLimit bool
// Whether OOM killer disalbe is supported or not
OomKillDisable bool
// Whether memory swappiness is supported or not
MemorySwappiness bool
}
type cgroupCpuInfo struct {
CpuCfsPeriod bool
CpuCfsQuota bool
type cgroupCPUInfo struct {
// Whether CPU CFS(Completely Fair Scheduler) period is supported or not
CPUCfsPeriod bool
// Whether CPU CFS(Completely Fair Scheduler) quota is supported or not
CPUCfsQuota bool
}