github.com/rsampaio/docker@v0.7.2-0.20150827203920-fdc73cc3fc31/pkg/sysinfo/sysinfo.go (about)

     1  package sysinfo
     2  
     3  // SysInfo stores information about which features a kernel supports.
     4  // TODO Windows: Factor out platform specific capabilities.
     5  type SysInfo struct {
     6  	// Whether the kernel supports AppArmor or not
     7  	AppArmor bool
     8  
     9  	cgroupMemInfo
    10  	cgroupCPUInfo
    11  	cgroupBlkioInfo
    12  	cgroupCpusetInfo
    13  
    14  	// Whether IPv4 forwarding is supported or not, if this was disabled, networking will not work
    15  	IPv4ForwardingDisabled bool
    16  
    17  	// Whether bridge-nf-call-iptables is supported or not
    18  	BridgeNfCallIptablesDisabled bool
    19  
    20  	// Whether bridge-nf-call-ip6tables is supported or not
    21  	BridgeNfCallIP6tablesDisabled bool
    22  
    23  	// Whether the cgroup has the mountpoint of "devices" or not
    24  	CgroupDevicesEnabled bool
    25  }
    26  
    27  type cgroupMemInfo struct {
    28  	// Whether memory limit is supported or not
    29  	MemoryLimit bool
    30  
    31  	// Whether swap limit is supported or not
    32  	SwapLimit bool
    33  
    34  	// Whether OOM killer disalbe is supported or not
    35  	OomKillDisable bool
    36  
    37  	// Whether memory swappiness is supported or not
    38  	MemorySwappiness bool
    39  
    40  	// Whether kernel memory limit is supported or not
    41  	KernelMemory bool
    42  }
    43  
    44  type cgroupCPUInfo struct {
    45  	// Whether CPU shares is supported or not
    46  	CPUShares bool
    47  
    48  	// Whether CPU CFS(Completely Fair Scheduler) period is supported or not
    49  	CPUCfsPeriod bool
    50  
    51  	// Whether CPU CFS(Completely Fair Scheduler) quota is supported or not
    52  	CPUCfsQuota bool
    53  }
    54  
    55  type cgroupBlkioInfo struct {
    56  	// Whether Block IO weight is supported or not
    57  	BlkioWeight bool
    58  }
    59  
    60  type cgroupCpusetInfo struct {
    61  	// Whether Cpuset is supported or not
    62  	Cpuset bool
    63  }