type Manager … // NewManager returns a new instance of Manager, or nil if the Intel RDT // functionality is not specified in the config, available from hardware or // enabled in the kernel. func NewManager(config *configs.Config, id string, path string) *Manager { … } // newManager is the same as NewManager, except it does not check if the feature // is actually available. Used by unit tests that mock intelrdt paths. func newManager(config *configs.Config, id string, path string) *Manager { … } const intelRdtTasks … var catEnabled … var mbaEnabled … var initOnce … var errNotFound … // Check if Intel RDT sub-features are enabled in featuresInit() func featuresInit() { … } // findIntelRdtMountpointDir returns the mount point of the Intel RDT "resource control" filesystem. func findIntelRdtMountpointDir() (string, error) { … } var intelRdtRoot … var intelRdtRootErr … var rootOnce … const defaultResctrlMountpoint … // Root returns the Intel RDT "resource control" filesystem mount point. func Root() (string, error) { … } // Gets a single uint64 value from the specified file. func getIntelRdtParamUint(path, file string) (uint64, error) { … } // Gets a string value from the specified file func getIntelRdtParamString(path, file string) (string, error) { … } func writeFile(dir, file, data string) error { … } // Get the read-only L3 cache information func getL3CacheInfo() (*L3CacheInfo, error) { … } // Get the read-only memory bandwidth information func getMemBwInfo() (*MemBwInfo, error) { … } // Get diagnostics for last filesystem operation error from file info/last_cmd_status func getLastCmdStatus() (string, error) { … } // WriteIntelRdtTasks writes the specified pid into the "tasks" file func WriteIntelRdtTasks(dir string, pid int) error { … } // Check if Intel RDT/CAT is enabled func IsCATEnabled() bool { … } // Check if Intel RDT/MBA is enabled func IsMBAEnabled() bool { … } // Get the path of the clos group in "resource control" filesystem that the container belongs to func (m *Manager) getIntelRdtPath() (string, error) { … } // Applies Intel RDT configuration to the process with the specified pid func (m *Manager) Apply(pid int) (err error) { … } // Destroys the Intel RDT container-specific 'container_id' group func (m *Manager) Destroy() error { … } // Returns Intel RDT path to save in a state file and to be able to // restore the object later func (m *Manager) GetPath() string { … } // Returns statistics for Intel RDT func (m *Manager) GetStats() (*Stats, error) { … } // Set Intel RDT "resource control" filesystem as configured. func (m *Manager) Set(container *configs.Config) error { … } func newLastCmdError(err error) error { … }