internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Startup stage reporting: prints sim's startup progress lines to stderr.

Package internal holds small host-side helpers shared by every sim mode.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Elapsed

func Elapsed() int

Elapsed returns whole seconds since process start.

func Home

func Home() string

Home mirrors Python's Path.home(): $HOME, or the passwd entry.

func IsCharDevice

func IsCharDevice(path string) bool

IsCharDevice reports whether path is a character special file.

func IsTerminal

func IsTerminal(fd int) bool

IsTerminal reports whether fd is a terminal (TCGETS succeeds).

func IsValidEnvName

func IsValidEnvName(name string) bool

IsValidEnvName mirrors the Python helper: str.isidentifier() and not starting with a dot. ASCII-practical, unicode-aware for letters/digits.

func KernelCwd

func KernelCwd() (string, error)

KernelCwd returns the kernel's current directory (what Python's os.getcwd() / Path.cwd() return, with symlinks resolved), unlike os.Getwd which prefers the possibly-symlinked $PWD. Falls back to os.Getwd.

func Print

func Print(message string)

Print logs a startup stage as "sim: [+Ns] message".

func Realpath

func Realpath(p string) string

Realpath mirrors Python's os.path.realpath: resolve symlinks, and fall back to an absolute cleaned path when a component does not exist.

func Tar

func Tar(image string) string

Tar names the exported podman image tars. The host (sim) and the sandbox entrypoint must agree on the name, so it lives in one place.

func User

func User() string

User is $USER or "" (Python os.environ.get("USER", "")).

func Which

func Which(name string) string

Which mirrors shutil.which: the PATH entry for name, or "".

func XDGRuntimeDir

func XDGRuntimeDir() string

XDGRuntimeDir is $XDG_RUNTIME_DIR or "".

Types

This section is empty.

Directories

Path Synopsis
Package config loads and validates sim's TOML configuration.
Package config loads and validates sim's TOML configuration.
Package entrypoint runs as PID 1 inside the sim sandbox: it seeds the podman configuration the sandbox needs, starts the background helpers, sources the host-configured setup hooks and finally execs the requested target command.
Package entrypoint runs as PID 1 inside the sim sandbox: it seeds the podman configuration the sandbox needs, starts the background helpers, sources the host-configured setup hooks and finally execs the requested target command.
Package imagestate is the handshake between the entrypoint's background image loader and the commands that must not run before the configured images are in the store (the session gate, and the Docker API listener).
Package imagestate is the handshake between the entrypoint's background image loader and the commands that must not run before the configured images are in the store (the session gate, and the Docker API listener).
Package launch builds and execs the sandboxed command ("sim <cmd>").
Package launch builds and execs the sandboxed command ("sim <cmd>").
Package resizewatch forwards terminal resizes into the sandbox.
Package resizewatch forwards terminal resizes into the sandbox.
Package shim is the podman shim: inside the sandbox it forces the container defaults the sandbox needs and waits for the background image import before handing off to the real podman; outside it is a transparent pass-through.
Package shim is the podman shim: inside the sandbox it forces the container defaults the sandbox needs and waits for the background image import before handing off to the real podman; outside it is a transparent pass-through.

Jump to

Keyboard shortcuts

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