environment_manager

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountFn

func MountFn(source string, target string, fstype string, flags uintptr, data string, recursiveMount bool) error

Types

type Environment

type Environment int
const (
	NoEnvironment Environment = iota
	EnabledScriptEnvironment
	ShellHookEnvironment
)

type Manager

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

func NewManager

func NewManager(chroot string, logger *log.Logger) *Manager

func (*Manager) AddObjectsToEnvironment

func (m *Manager) AddObjectsToEnvironment(objects ...ObjectDescriptor)

func (*Manager) AssembleEnvironmentForModule

func (m *Manager) AssembleEnvironmentForModule(moduleName, modulePath string, targetEnvironment Environment) error

func (*Manager) DisassembleEnvironmentForModule

func (m *Manager) DisassembleEnvironmentForModule(moduleName, modulePath string, targetEnvironment Environment) error

type ObjectDescriptor

type ObjectDescriptor struct {
	Source            string
	Target            string
	Flags             uintptr
	Type              Type
	TargetEnvironment Environment
}

type Type

type Type string
const (
	Mount   Type = "mount"
	File    Type = "file"
	DevNull Type = "devNull"
)

Jump to

Keyboard shortcuts

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