localrun

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package localrun provides the foreground app runner for `shinyhub run`. It resolves the exact launch a hub native runtime would perform and runs the app process locally, with readiness polling, --check mode, and signal handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, o Options, stdout, stderr io.Writer) error

Run boots the app bundle and blocks until the context is cancelled (or, in --check mode, until the first healthy poll or crash). It streams all app output to stdout/stderr and returns a non-nil error on any failure.

Types

type Options

type Options struct {
	// BundleDir is the app bundle directory to run (required).
	BundleDir string
	// Slug is a human label for log output. Defaults to the basename of BundleDir.
	Slug string
	// DataDir is the host path used as SHINYHUB_APP_DATA and symlinked to
	// <BundleDir>/data. When empty, defaults to <BundleDir>/.shinyhub-run/data.
	DataDir string
	// Port is the local TCP port to bind. When 0, a free port is allocated.
	Port int
	// Env is additional environment in KEY=VALUE form, layered above the
	// sanitized host env but below the platform-controlled PORT and SHINYHUB_APP_DATA.
	Env []string
	// NoSync skips the explicit dep-prep steps (uv sync / renv restore).
	NoSync bool
	// NoReload disables framework hot reload and the file-watch fallback.
	NoReload bool
	// Open opens the serving URL in the default browser after readiness.
	Open bool
	// Check runs in preflight mode: boot, verify healthy, stop, exit 0/1.
	Check bool
}

Options configures a local foreground run.

Jump to

Keyboard shortcuts

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