provision

package
v0.16.521 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package provision finds and installs a verified browser without weakening its sandbox.

Index

Constants

View Source
const Version = "157.0.8103.38"

Version is pinned with the hashes below; tools/update-browser-checksums.sh downloads every archive before hashing.

Variables

This section is empty.

Functions

func DownloadSupport

func DownloadSupport(cfg Config) error

DownloadSupport lets machine checks explain unsupported or offline installs without starting a download.

func Ensure

func Ensure(ctx context.Context, cfg Config, progress func(Progress)) (string, error)

Ensure serializes installations across profiles and runtime processes. Interrupted transfers restart from zero.

func EnvNoSandbox

func EnvNoSandbox() bool

EnvNoSandbox reports whether RUNTIME_BROWSER_CHROME_ARGS turns Chrome's sandbox off for this deployment.

func Find

func Find(cfg Config) (path, snap string, err error)

Find never downloads or starts Chrome. Snap candidates are returned separately for a pipe probe.

func InstallCommand

func InstallCommand(release string) string

InstallCommand suggests a native browser, including its libraries, for the detected distribution.

func LibrariesCommand

func LibrariesCommand(release string) string

LibrariesCommand avoids Ubuntu's chromium snap wrapper when only shared libraries are missing.

func Mode

func Mode(requested string) string

Mode reports the display the host will choose; lack of Xvfb is a supported headless configuration.

func Retain

func Retain(chrome string) (io.Closer, error)

Retain prevents an upgrade from removing resources a running Chrome may still load. Hosts and probes hold this lease until Chrome exits; system installations need no lease.

func SandboxArgs

func SandboxArgs(extra []string, noSandbox *bool) []string

SandboxArgs applies an explicit preference over manual environment flags. Nil preserves legacy environment configuration for deployments without a preference.

func SandboxHelp

func SandboxHelp(chrome string) string

SandboxHelp preserves the sandbox by making every privilege-changing remedy an explicit choice.

Types

type Config

type Config struct {
	DataDir, Chrome, URL, GOOS, GOARCH string

	Download bool
	LookPath func(string) (string, error)
	// contains filtered or unexported fields
}

Config captures environment settings once so concurrent profiles use the same installation.

func FromEnv

func FromEnv(data string) Config

FromEnv keeps download policy consistent for the lifetime of a manager.

type Diagnostic

type Diagnostic struct{ Message, Command string }

Diagnostic separates a copyable repair command from the human explanation.

func (*Diagnostic) Error

func (d *Diagnostic) Error() string

Error keeps the repair detail available to both tools and the panel.

type Inspection

type Inspection struct{ Chrome, Version, Mode, Sandbox string }

Inspection is safe to display in a machine check; no browsing data or Chrome log is returned.

func Probe

func Probe(ctx context.Context, chrome, data string) (Inspection, error)

Probe verifies the real debugging pipe and creates a renderer, so sandbox failures are not mistaken for readiness.

func ProbeWithSandbox

func ProbeWithSandbox(ctx context.Context, chrome, data string, noSandbox *bool) (Inspection, error)

ProbeWithSandbox checks Chrome with the same explicit preference as a new host.

type Progress

type Progress struct {
	Percent int
	Hint    string
}

Progress describes preparation independently of a profile's connection state.

Jump to

Keyboard shortcuts

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