sys

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandExists

func CommandExists(command string) bool

CommandExists

Types

type Runner

type Runner interface {
	Run(cmd string, args ...string) ([]byte, error)
	RunEnv(cmd string, env []string, args ...string) ([]byte, error)
	RunContext(ctx context.Context, cmd string, args ...string) ([]byte, error)
	RunContextParseOutput(ctx context.Context, stdoutH, stderrH func(line string), cmd string, args ...string) error
}

type Syscall

type Syscall interface {
	Chroot(string) error
	Chdir(string) error
}

type System

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

func NewSystem

func NewSystem(opts ...SystemOpts) (*System, error)

func (System) FS

func (s System) FS() vfs.FS

func (System) Logger

func (s System) Logger() log.Logger

func (System) Mounter

func (s System) Mounter() mounter.Interface

func (System) Platform

func (s System) Platform() *platform.Platform

func (System) Runner

func (s System) Runner() Runner

func (System) Syscall

func (s System) Syscall() Syscall

type SystemOpts

type SystemOpts func(a *System) error

func WithFS

func WithFS(fs vfs.FS) SystemOpts

func WithLogger

func WithLogger(logger log.Logger) SystemOpts

func WithMounter

func WithMounter(mounter mounter.Interface) SystemOpts

func WithPlatform

func WithPlatform(pf string) SystemOpts

func WithRunner

func WithRunner(runner Runner) SystemOpts

func WithSyscall

func WithSyscall(syscall Syscall) SystemOpts

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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