interrupt

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 3 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 interrupt is how an interrupted physa init ends: the command's context was cancelled (SIGINT or SIGTERM), so init started nothing more, the sessions running were stopped through that context, and what was already finished stays in init's record. It says so, says what was kept and the line that continues, and gives the code to exit with.

Index

Constants

View Source
const Code = 130

Code is the exit code of an interrupted run, the one shells give a run SIGINT ended. It tells an interrupt apart from the cap's stop (1) and a failure (2).

Variables

This section is empty.

Functions

func Interrupted

func Interrupted(ctx context.Context) bool

Interrupted reports whether ctx, the command's context, was cancelled.

func Kept

func Kept(n int) string

Kept is what an interrupted recovery kept: the n capabilities this run recovered, stored in init's record beside any an earlier run kept, which recovery said when it started.

func Line

func Line(kept, continueLine string) string

Line is what init prints after "physa init: " when a run was interrupted: nothing more was started, the sessions running were stopped, what was kept, and continueLine to continue.

func Nothing

func Nothing(what string) string

Nothing is what a phase that stores only when whole kept when interrupted: nothing of what (such as "the walk") was stored.

func Say

func Say(w io.Writer, kept, continueLine string) int

Say prints Line with kept and continueLine on w, after "physa init: ", and returns Code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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