hybrid_sysfs

package
v0.0.0-...-f91051b Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 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 HybridFs

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

HybridFs delegates between to filesystems based on paths

func NewHybridFs

func NewHybridFs(nativeFs sysfs.Filesystem, mockFs *sysfs.MockFilesystem) *HybridFs

func (*HybridFs) AddMockablePath

func (hfs *HybridFs) AddMockablePath(name string)

AddMockablePath sets a file path that will be delegated to the mock file system instead of the native file system

func (*HybridFs) OpenFile

func (hfs *HybridFs) OpenFile(name string, flag int, perm os.FileMode) (file sysfs.File, err error)

func (*HybridFs) Stat

func (hfs *HybridFs) Stat(name string) (os.FileInfo, error)

type HybridSyscall

type HybridSyscall struct {
	Impl func(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
}

MockSyscall represents the hybrid sys call

func (*HybridSyscall) Syscall

func (sys *HybridSyscall) Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)

Syscall implements the SystemCaller interface

Jump to

Keyboard shortcuts

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