preflight

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package preflight checks the local machine before anything else happens: Docker, its daemon, and for every driver a running container with the right tools and credentials. Each failure comes with the command that fixes it.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDocker = errors.New("docker is not usable")

ErrNoDocker means Docker itself is unusable, so no driver can work.

Functions

This section is empty.

Types

type Check

type Check struct {
	OK     bool
	Title  string
	Detail string   // shown after the title, e.g. a version
	Fix    []string // what to do when it failed, one line each
}

Check is one line of the report.

type Report

type Report struct {
	Checks []Check
	Ready  []driver.Driver // drivers whose local side is usable
}

Report is the outcome of Run.

func Run

func Run(ctx context.Context, drivers []driver.Driver) (Report, error)

Run checks Docker and then every driver's container. A missing container only disables that driver; Docker being unusable is fatal and returns ErrNoDocker.

func (Report) Failed

func (r Report) Failed() bool

Failed reports whether any check failed.

Jump to

Keyboard shortcuts

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