linuxpath

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 3 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PathRoots added in v0.9.0

type PathRoots struct {
	Etc  string
	Proc string
	Run  string
	Sys  string
	Var  string
}

PathRoots holds the roots of all the filesystem subtrees ghw wants to access.

func DefaultPathRoots added in v0.9.0

func DefaultPathRoots() PathRoots

DefaultPathRoots return the canonical default value for PathRoots

func PathRootsFromContext added in v0.9.0

func PathRootsFromContext(ctx *context.Context) PathRoots

PathRootsFromContext initialize PathRoots from the given Context, allowing overrides of the canonical default paths.

type Paths

type Paths struct {
	VarLog                 string
	ProcMeminfo            string
	ProcCpuinfo            string
	ProcMounts             string
	SysKernelMMHugepages   string
	SysBlock               string
	SysDevicesSystemNode   string
	SysDevicesSystemMemory string
	SysDevicesSystemCPU    string
	SysBusPciDevices       string
	SysClassDRM            string
	SysClassDMI            string
	SysClassNet            string
	RunUdevData            string
}

func New

func New(ctx *context.Context) *Paths

New returns a new Paths struct containing filepath fields relative to the supplied Context

func (*Paths) NodeCPU

func (p *Paths) NodeCPU(nodeID int, lpID int) string

func (*Paths) NodeCPUCache

func (p *Paths) NodeCPUCache(nodeID int, lpID int) string

func (*Paths) NodeCPUCacheIndex

func (p *Paths) NodeCPUCacheIndex(nodeID int, lpID int, cacheIndex int) string

Jump to

Keyboard shortcuts

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