package fakesysfs
import "github.com/google/cadvisor/utils/sysfs/fakesysfs"
Index ¶
- type FakeSysFs
- func (fs *FakeSysFs) GetBlockDeviceNumbers(name string) (string, error)
- func (fs *FakeSysFs) GetBlockDeviceScheduler(name string) (string, error)
- func (fs *FakeSysFs) GetBlockDeviceSize(name string) (string, error)
- func (fs *FakeSysFs) GetBlockDevices() ([]os.FileInfo, error)
- func (fs *FakeSysFs) GetBookID(coreIDPath string) (string, error)
- func (fs *FakeSysFs) GetCPUPhysicalPackageID(cpuPath string) (string, error)
- func (fs *FakeSysFs) GetCPUsPaths(cpusPath string) ([]string, error)
- func (fs *FakeSysFs) GetCacheInfo(cpu int, cache string) (sysfs.CacheInfo, error)
- func (fs *FakeSysFs) GetCaches(id int) ([]os.FileInfo, error)
- func (fs *FakeSysFs) GetCoreID(coreIDPath string) (string, error)
- func (fs *FakeSysFs) GetDistances(nodeDir string) (string, error)
- func (fs *FakeSysFs) GetDrawerID(coreIDPath string) (string, error)
- func (fs *FakeSysFs) GetHugePagesInfo(hugepagesDirectory string) ([]os.FileInfo, error)
- func (fs *FakeSysFs) GetHugePagesNr(hugepagesDirectory string, hugePageName string) (string, error)
- func (fs *FakeSysFs) GetMemInfo(nodePath string) (string, error)
- func (fs *FakeSysFs) GetNetworkAddress(name string) (string, error)
- func (fs *FakeSysFs) GetNetworkDevices() ([]os.FileInfo, error)
- func (fs *FakeSysFs) GetNetworkMtu(name string) (string, error)
- func (fs *FakeSysFs) GetNetworkSpeed(name string) (string, error)
- func (fs *FakeSysFs) GetNetworkStatValue(name string, stat string) (uint64, error)
- func (fs *FakeSysFs) GetNodesPaths() ([]string, error)
- func (fs *FakeSysFs) GetSystemUUID() (string, error)
- func (fs *FakeSysFs) IsBlockDeviceHidden(name string) (bool, error)
- func (fs *FakeSysFs) IsCPUOnline(dir string) bool
- func (fs *FakeSysFs) SetBookIDs(bookIDs map[string]string, bookIDErrors map[string]error)
- func (fs *FakeSysFs) SetCPUsPaths(paths map[string][]string, err error)
- func (fs *FakeSysFs) SetCacheInfo(cache sysfs.CacheInfo)
- func (fs *FakeSysFs) SetCoreThreads(coreThread map[string]string, coreThreadErrors map[string]error)
- func (fs *FakeSysFs) SetDistances(nodeDir string, distances string, err error)
- func (fs *FakeSysFs) SetDrawerIDs(drawerIDs map[string]string, drawerIDErrors map[string]error)
- func (fs *FakeSysFs) SetEntryName(name string)
- func (fs *FakeSysFs) SetHugePages(hugePages []os.FileInfo, err error)
- func (fs *FakeSysFs) SetHugePagesNr(hugePagesNr map[string]string, err error)
- func (fs *FakeSysFs) SetMemory(memTotal string, err error)
- func (fs *FakeSysFs) SetNodesPaths(paths []string, err error)
- func (fs *FakeSysFs) SetOnlineCPUs(online map[string]interface{})
- func (fs *FakeSysFs) SetPhysicalPackageIDs(physicalPackageIDs map[string]string, physicalPackageIDErrors map[string]error)
- type FileInfo
Types ¶
type FakeSysFs ¶
type FakeSysFs struct {
// contains filtered or unexported fields
}
func (*FakeSysFs) GetBlockDeviceNumbers ¶
func (*FakeSysFs) GetBlockDeviceScheduler ¶
func (*FakeSysFs) GetBlockDeviceSize ¶
func (*FakeSysFs) GetBlockDevices ¶
func (*FakeSysFs) GetBookID ¶
func (*FakeSysFs) GetCPUPhysicalPackageID ¶
func (*FakeSysFs) GetCPUsPaths ¶
func (*FakeSysFs) GetCacheInfo ¶
func (*FakeSysFs) GetCaches ¶
func (*FakeSysFs) GetCoreID ¶
func (*FakeSysFs) GetDistances ¶
func (*FakeSysFs) GetDrawerID ¶
func (*FakeSysFs) GetHugePagesInfo ¶
func (*FakeSysFs) GetHugePagesNr ¶
func (*FakeSysFs) GetMemInfo ¶
func (*FakeSysFs) GetNetworkAddress ¶
func (*FakeSysFs) GetNetworkDevices ¶
func (*FakeSysFs) GetNetworkMtu ¶
func (*FakeSysFs) GetNetworkSpeed ¶
func (*FakeSysFs) GetNetworkStatValue ¶
func (*FakeSysFs) GetNodesPaths ¶
func (*FakeSysFs) GetSystemUUID ¶
func (*FakeSysFs) IsBlockDeviceHidden ¶
func (*FakeSysFs) IsCPUOnline ¶
func (*FakeSysFs) SetBookIDs ¶
func (*FakeSysFs) SetCPUsPaths ¶
func (*FakeSysFs) SetCacheInfo ¶
func (*FakeSysFs) SetCoreThreads ¶
func (fs *FakeSysFs) SetCoreThreads(coreThread map[string]string, coreThreadErrors map[string]error)
func (*FakeSysFs) SetDistances ¶
func (*FakeSysFs) SetDrawerIDs ¶
func (*FakeSysFs) SetEntryName ¶
func (*FakeSysFs) SetHugePages ¶
func (*FakeSysFs) SetHugePagesNr ¶
func (*FakeSysFs) SetMemory ¶
func (*FakeSysFs) SetNodesPaths ¶
func (*FakeSysFs) SetOnlineCPUs ¶
func (*FakeSysFs) SetPhysicalPackageIDs ¶
func (fs *FakeSysFs) SetPhysicalPackageIDs(physicalPackageIDs map[string]string, physicalPackageIDErrors map[string]error)
type FileInfo ¶
type FileInfo struct { EntryName string }
If we extend sysfs to support more interfaces, it might be worth making this a mock instead of a fake.
func (*FileInfo) IsDir ¶
func (*FileInfo) ModTime ¶
func (*FileInfo) Mode ¶
func (*FileInfo) Name ¶
func (*FileInfo) Size ¶
func (*FileInfo) Sys ¶
func (i *FileInfo) Sys() interface{}
Source Files ¶
- Version
- v0.52.1 (latest)
- Published
- Mar 5, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 3 days ago –
Tools for package owners.