linuxpath

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PathRoots

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

func DefaultPathRoots() PathRoots

DefaultPathRoots return the canonical default value for PathRoots

func PathRootsFromContext

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
	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