nsjail_manager

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, logger *slog.Logger, config config.AppConfig) error

Run is the main entry point that determines whether to execute as a parent or child process. If running as a child (CHILD env var is set), it sets up networking in the namespace and executes the target command. Otherwise, it runs as the parent process, setting up the jail, proxy server, and managing the child process lifecycle.

func RunChild

func RunChild(logger *slog.Logger, cfg config.AppConfig) error

func RunParent

func RunParent(ctx context.Context, logger *slog.Logger, config config.AppConfig) error

Types

type NSJailManager

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

func NewNSJailManager

func NewNSJailManager(
	ruleEngine rulesengine.Engine,
	auditor audit.Auditor,
	tlsConfig *tls.Config,
	jailer nsjail.Jailer,
	logger *slog.Logger,
	config config.AppConfig,
) (*NSJailManager, error)

func (*NSJailManager) Run

func (b *NSJailManager) Run(ctx context.Context) error

func (*NSJailManager) RunChildProcess

func (b *NSJailManager) RunChildProcess(command []string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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