Documentation ¶
Index ¶
- func GetCPU() (*api.ResourcesCPU, error)
- func GetCPUIsolated() []int64
- func GetDisksByID(filterPrefix string) ([]string, error)
- func GetGPU() (*api.ResourcesGPU, error)
- func GetMemory() (*api.ResourcesMemory, error)
- func GetNetwork() (*api.ResourcesNetwork, error)
- func GetNetworkCounters(name string) (*api.NetworkStateCounters, error)
- func GetNetworkState(name string) (*api.NetworkState, error)
- func GetPCI() (*api.ResourcesPCI, error)
- func GetResources() (*api.Resources, error)
- func GetStorage() (*api.ResourcesStorage, error)
- func GetSystem() (*api.ResourcesSystem, error)
- func GetUSB() (*api.ResourcesUSB, error)
- func ParseCpuset(cpu string) ([]int64, error)
- func ParseNumaNodeSet(numaNodeSet string) ([]int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCPU ¶
func GetCPU() (*api.ResourcesCPU, error)
GetCPU returns a filled api.ResourcesCPU struct ready for use by LXD.
func GetCPUIsolated ¶
func GetCPUIsolated() []int64
GetCPUIsolated returns a slice of IDs corresponding to isolated threads.
func GetDisksByID ¶
GetDisksByID returns all disks whose ID contains the filter prefix.
func GetGPU ¶
func GetGPU() (*api.ResourcesGPU, error)
GetGPU returns a filled api.ResourcesGPU struct ready for use by LXD.
func GetMemory ¶
func GetMemory() (*api.ResourcesMemory, error)
GetMemory returns a filled api.ResourcesMemory struct ready for use by LXD.
func GetNetwork ¶
func GetNetwork() (*api.ResourcesNetwork, error)
GetNetwork returns a filled api.ResourcesNetwork struct ready for use by LXD.
func GetNetworkCounters ¶
func GetNetworkCounters(name string) (*api.NetworkStateCounters, error)
GetNetworkCounters returns the current packet counters for the network interface.
func GetNetworkState ¶
func GetNetworkState(name string) (*api.NetworkState, error)
GetNetworkState returns the OS configuration for the network interface.
func GetPCI ¶
func GetPCI() (*api.ResourcesPCI, error)
GetPCI returns a filled api.ResourcesPCI struct ready for use by LXD.
func GetResources ¶
GetResources returns a filled api.Resources struct ready for use by LXD.
func GetStorage ¶
func GetStorage() (*api.ResourcesStorage, error)
GetStorage returns a filled api.ResourcesStorage struct ready for use by LXD.
func GetSystem ¶
func GetSystem() (*api.ResourcesSystem, error)
GetSystem returns a filled api.ResourcesSystem struct ready for use by LXD.
func GetUSB ¶
func GetUSB() (*api.ResourcesUSB, error)
GetUSB returns a filled api.ResourcesUSB struct ready for use by LXD.
func ParseCpuset ¶
ParseCpuset parses a `limits.cpu` range into a list of CPU ids.
func ParseNumaNodeSet ¶
ParseNumaNodeSet parses a `limits.cpu.nodes` into a list of NUMA node ids.
Types ¶
This section is empty.