fakesysfs

package
v0.37.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeSysFs

type FakeSysFs struct {
	// contains filtered or unexported fields
}

func (*FakeSysFs) GetBlockDeviceNumbers

func (fs *FakeSysFs) GetBlockDeviceNumbers(name string) (string, error)

func (*FakeSysFs) GetBlockDeviceScheduler

func (fs *FakeSysFs) GetBlockDeviceScheduler(name string) (string, error)

func (*FakeSysFs) GetBlockDeviceSize

func (fs *FakeSysFs) GetBlockDeviceSize(name string) (string, error)

func (*FakeSysFs) GetBlockDevices

func (fs *FakeSysFs) GetBlockDevices() ([]os.FileInfo, error)

func (*FakeSysFs) GetCPUPhysicalPackageID added in v0.37.0

func (fs *FakeSysFs) GetCPUPhysicalPackageID(cpuPath string) (string, error)

func (*FakeSysFs) GetCPUsPaths added in v0.37.0

func (fs *FakeSysFs) GetCPUsPaths(cpusPath string) ([]string, error)

func (*FakeSysFs) GetCacheInfo

func (fs *FakeSysFs) GetCacheInfo(cpu int, cache string) (sysfs.CacheInfo, error)

func (*FakeSysFs) GetCaches

func (fs *FakeSysFs) GetCaches(id int) ([]os.FileInfo, error)

func (*FakeSysFs) GetCoreID added in v0.37.0

func (fs *FakeSysFs) GetCoreID(coreIDPath string) (string, error)

func (*FakeSysFs) GetHugePagesInfo added in v0.37.0

func (fs *FakeSysFs) GetHugePagesInfo(hugepagesDirectory string) ([]os.FileInfo, error)

func (*FakeSysFs) GetHugePagesNr added in v0.37.0

func (fs *FakeSysFs) GetHugePagesNr(hugepagesDirectory string, hugePageName string) (string, error)

func (*FakeSysFs) GetMemInfo added in v0.37.0

func (fs *FakeSysFs) GetMemInfo(nodePath string) (string, error)

func (*FakeSysFs) GetNetworkAddress

func (fs *FakeSysFs) GetNetworkAddress(name string) (string, error)

func (*FakeSysFs) GetNetworkDevices

func (fs *FakeSysFs) GetNetworkDevices() ([]os.FileInfo, error)

func (*FakeSysFs) GetNetworkMtu

func (fs *FakeSysFs) GetNetworkMtu(name string) (string, error)

func (*FakeSysFs) GetNetworkSpeed

func (fs *FakeSysFs) GetNetworkSpeed(name string) (string, error)

func (*FakeSysFs) GetNetworkStatValue

func (fs *FakeSysFs) GetNetworkStatValue(name string, stat string) (uint64, error)

func (*FakeSysFs) GetNodesPaths added in v0.37.0

func (fs *FakeSysFs) GetNodesPaths() ([]string, error)

func (*FakeSysFs) GetSystemUUID

func (fs *FakeSysFs) GetSystemUUID() (string, error)

func (*FakeSysFs) IsCPUOnline added in v0.37.0

func (fs *FakeSysFs) IsCPUOnline(dir string) bool

func (*FakeSysFs) SetCPUsPaths added in v0.37.0

func (fs *FakeSysFs) SetCPUsPaths(paths map[string][]string, err error)

func (*FakeSysFs) SetCacheInfo

func (fs *FakeSysFs) SetCacheInfo(cache sysfs.CacheInfo)

func (*FakeSysFs) SetCoreThreads added in v0.37.0

func (fs *FakeSysFs) SetCoreThreads(coreThread map[string]string, coreThreadErrors map[string]error)

func (*FakeSysFs) SetEntryName

func (fs *FakeSysFs) SetEntryName(name string)

func (*FakeSysFs) SetHugePages added in v0.37.0

func (fs *FakeSysFs) SetHugePages(hugePages []os.FileInfo, err error)

func (*FakeSysFs) SetHugePagesNr added in v0.37.0

func (fs *FakeSysFs) SetHugePagesNr(hugePagesNr map[string]string, err error)

func (*FakeSysFs) SetMemory added in v0.37.0

func (fs *FakeSysFs) SetMemory(memTotal string, err error)

func (*FakeSysFs) SetNodesPaths added in v0.37.0

func (fs *FakeSysFs) SetNodesPaths(paths []string, err error)

func (*FakeSysFs) SetOnlineCPUs added in v0.37.0

func (fs *FakeSysFs) SetOnlineCPUs(online map[string]interface{})

func (*FakeSysFs) SetPhysicalPackageIDs added in v0.37.0

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 (i *FileInfo) IsDir() bool

func (*FileInfo) ModTime

func (i *FileInfo) ModTime() time.Time

func (*FileInfo) Mode

func (i *FileInfo) Mode() os.FileMode

func (*FileInfo) Name

func (i *FileInfo) Name() string

func (*FileInfo) Size

func (i *FileInfo) Size() int64

func (*FileInfo) Sys

func (i *FileInfo) Sys() interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL