install

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 39 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

How icebath came onto a computer and what marks it: the stamp an installer writes into the folder it made for the program, the package managers, images and source checkouts that own a program instead, and the PATH lines and the Windows environment an install sets

Index

Constants

View Source
const (
	// Something is under way, which Doing names
	Busy = "busy"
	// Nothing is under way, or the process only waits to be told
	Ready = "ready"
	// The process ends now, as the asker said Go
	Ending = "ending"
	// The process was told the words of Go, or that the ask was called off
	Noticed = "noticed"
)

States of an answer

View Source
const (
	Systemd = "systemd"
	Launchd = "launchd"
	// The service manager of Windows
	Service = "service"
	// runit's runsv, which termux-services runs services with on Termux, and Void Linux and many containers on Linux
	Runit = "runit"
)

Programs that run a process

View Source
const Checksums = "checksums.txt"

Asset of every release listing the sha256 and the name of each other asset, two spaces between

View Source
const ProfileScript = "/etc/profile.d/icebath.sh"

Login script the install script makes for an install for everyone of a computer whose PATH lacks /usr/local/bin, holding the marked line that puts it there

View Source
const (
	PyPIName = "icebath-cli"
)

Name icebath is published under on PyPI, and the name its files carry in a Python environment

View Source
const Repository = "https://github.com/nickheyer/icebath"

Where the releases of icebath are published

View Source
const SettledName = "settled.json"

File of the settings folder that says, by install and by part of icebath, which install the first start settled there: what the first start after an install owes is owed again once an installer runs again or a package manager puts another version in place

View Source
const ShellMarker = "# added by icebath"

Comment line a line icebath adds to a shell startup file carries directly above it, such as the one that puts its command on the PATH, which an uninstall finds and strips with the line under it

View Source
const SignatureSuffix = ".sig"

Suffix of the file beside a signed file that holds its signature

View Source
const StampName = ".icebath-install"

File an installer writes last into the folder it made for the program, which marks that folder as one an installer made: lines of name=value, read as data and never sourced, a name given again for each value of a list

View Source
const WinGetID = "nickheyer.icebath"

Identifier icebath is published under in the WinGet community repository, which names its package folder and its Apps and Features entry

Variables

View Source
var Shells = []Shell{Bash, Zsh, Sh, Fish, Nu, Csh, Pwsh}

Every family, in the order a report lists them

Functions

func AddShellLine

func AddShellLine(rc, line string) (bool, error)

Adds the line under the marker at the end of the startup file, after a blank line, unless the file has that line already: whether it added it

func AddUserPath

func AddUserPath(string) (bool, error)

func Apps

func Apps(string) bool

The Apps and Features entries of Windows, which no other system has

func Archive

func Archive(version, goos, goarch string) string

Name of the release archive of a version for an OS and architecture: icebath_1.4.2_linux_amd64.tar.gz, a zip on Windows

func Aside

func Aside(program string) []string

Programs an update moved aside beside the program, oldest first, which processes started before it may still run

func Bin

func Bin(system bool) string

Folder of the commands icebath puts on the person's PATH, the icebath command and the shell commands of profiles: ~/.local/bin, or /usr/local/bin for an install for everyone of the computer, or in Termux its own bin folder, the person's and on the PATH of every shell there; empty when the system names no home

func Cache

func Cache() string

Folder of what every icebath of this user shares whatever settings folder each uses: the user's cache folder, else one of the system's temporary folder of this user's own

func Checked

func Checked() string

What this build checks a release by, as a person reads it

func ChecksumOf

func ChecksumOf(body []byte, name string) string

sha256 a checksums file gives the name, in lower case; empty when it lists no such name

func Commands

func Commands(name string, path []string) []string

Every program by the name of the command in the folders of the PATH, in the order a shell looks, the first being the one it runs; on Windows with the endings PATHEXT gives commands

func Compare

func Compare(a, b string) int

Order of two versions by the precedence of semantic versioning, a leading v optional: negative when a comes first, positive when b does, zero for the same precedence. Text that is no version comes before every version, and two such by their text

func Contained

func Contained() bool

Whether this process runs inside a container, as Docker and Podman mark one

func ID

func ID() string

Id of the install of this process, which every record of an install is named by

func IDOf

func IDOf(exe string) string

Id of the install of the program at the path: twelve hex digits of the digest of the folder the program is in, its links followed and, where the file system ignores case as on Windows and macOS, in lower case

func Installer

func Installer() string

Command a person runs to install icebath with the install script on this computer

func Keyed

func Keyed() bool

Whether this build carries a key to check the signature of a release with; without one a release is checked by its digests alone

func Leads

func Leads(cmd string) string

Program a command runs: where its links lead, or the program a small script of icebath runs with exec; the command itself otherwise

func LineFolder

func LineFolder(line, home string) string

Folder a marked PATH line icebath wrote puts on PATH, empty for a line of another kind

func LoginShell

func LoginShell() string

Login shell of the person: SHELL, else the one the system's record of accounts names for this user; empty on Windows and when neither says

func MarkedPath

func MarkedPath(rc, dir, home string) bool

Whether a line icebath marked in the startup file puts the folder on PATH

func OnlyMarked

func OnlyMarked(rc string) bool

Whether the startup file holds nothing but the lines icebath marked, their markers and blank lines, as a file icebath made itself does

func PathLine

func PathLine(s Shell, dir, home string) string

Line that puts the folder first on the PATH of a shell of the family, once however often the file is read; empty for a folder whose name holds characters no line of every shell takes plainly, such as a quote, a dollar or a colon

func ProgramName

func ProgramName(goos string) string

File name of the program on the OS

func Publish

func Publish(program, bin string) (bool, error)

Makes the command icebath of the folder of commands lead to the program: a link made beside it and renamed over it, so a shell never finds none. A command there already that leads nowhere, to another program of icebath, or is a copy of one is replaced; another program's is never touched. Whether it changed anything. Linux and macOS only: on Windows the program's folder goes on the user PATH

func RemoveApps

func RemoveApps(string) (bool, error)

func RemoveShellLine

func RemoveShellLine(rc, line string) (bool, error)

Removes one line icebath added to the startup file, with its marker and the blank line AddShellLine put above it, as when the folder the line puts on PATH is gone: whether it was there

func RemoveUserPath

func RemoveUserPath([]string) ([]string, error)

func RemoveUserVar

func RemoveUserVar(string) (bool, error)

func Replace

func Replace(staged, program string) (string, error)

Puts the staged program in place of the program, both in one folder: one rename where the system lets a running program be replaced, and on Windows, which keeps a running program's file, the program renamed aside first and put back when the staged one can't follow. Where the old program went, empty when it went nowhere

func SetsPath

func SetsPath(rc, dir, home string) bool

Whether a line of the startup file that is no comment puts the folder on the PATH: one that sets a PATH and names the folder, as written, through $HOME, ${HOME} or ~, marked by icebath or written by the person or their system, such as Fedora's .bashrc

func ShellFiles

func ShellFiles(home string) []string

Startup files of every family of shells under the home folder, where icebath may have marked lines: those of bash, zsh (in the home and in ZDOTDIR), sh, fish, nushell, csh and PowerShell, the files of fish and PowerShell in ~/.config and in XDG_CONFIG_HOME both

func ShellLines

func ShellLines(rc string) []string

The lines the marker stands above in the startup file

func Stable

func Stable(tag string) bool

Whether the text is a stable release tag vX.Y.Z

func Staged

func Staged(program string) string

Where a new program waits beside the program until it is put in place: in its folder, so putting it there is one rename

func StripShellLines

func StripShellLines(rc string) (int, error)

Removes each marker in the startup file with the line under it, and the blank line AddShellLine put above it: how many lines it removed of what icebath added

func Sweep

func Sweep(program string) []string

Removes the programs moved aside beside the program that no process runs any more, which the system then lets go; those removed

func Tree

func Tree(system bool) string

Folder the install script makes for the program and its stamp: the user's data folder's icebath on Linux and macOS (${XDG_DATA_HOME:-~/.local/share}/icebath) and Programs\icebath of the user's local application data on Windows, or /usr/local/lib/icebath for an install for everyone of the computer, as the script makes when it runs as root; empty when the system names no home

func Unpack

func Unpack(archive, dir, goos string) (string, error)

Unpacks the program of a release archive for the OS into the folder, the archive's other files left in it: the program at the archive's root or inside its one top folder, a regular file and nothing else. The path of the program unpacked

func UserPath

func UserPath() []string

The user PATH and variables of the Windows registry, which no other system has

func UserVar

func UserVar(string) (string, bool)

func Valid

func Valid(version string) bool

Whether the text is a version by the rules of semantic versioning, a leading v optional

func Verify

func Verify(what string, data, signature []byte, published time.Time) error

Checks the signature of data, published at the time: base64 as cosign writes it, of ECDSA P-256 over the SHA-256 of the data or of Ed25519 over the data, made by a key this build trusts that was not retired by then. An error a person reads when no such key made it

func Versions

func Versions(body []byte) []string

Versions the release archives a checksums file lists hold, each once in the order first listed: one for the checksums of one release

func WriteStamp

func WriteStamp(tree string, stamp Stamp) error

Writes the stamp into the folder whole, as an installer or an update of the program keeps it

Types

type Ack

type Ack struct {
	PID   int    `json:"pid"`
	Start int64  `json:"start,omitempty"`
	Want  Want   `json:"want"`
	State string `json:"state"`
	// What is under way that the process finishes first, while Busy
	Doing string    `json:"doing,omitempty"`
	At    time.Time `json:"at"`
}

How one process answered an ask

type Announce

type Announce struct {
	Purpose  Purpose
	Settings string
	Profile  string
	// Start time of a process as the system reads it, false when it can't be read
	Started func(pid int) (int64, bool)
}

What a process announces of itself

type Ask

type Ask struct {
	Reason   Reason
	Install  string
	Settings string
	// What every process asked wants, but those Wants names by their pid
	Want  Want
	Wants map[int]Want
	// Deadline of the work under way that an ask to end waits for
	Until time.Time
	// What the processes asked say while they wait, such as that icebath is updating to 1.5.0
	Coming string
}

One ask of the icebath processes of an install and of a settings folder, either empty for any, the asker always spared

type Asked

type Asked struct {
	// contains filtered or unexported fields
}

An ask this process made of others, which it follows and settles

func (*Asked) Ack

func (a *Asked) Ack(p Process) (Ack, bool)

The answer of the process, false while it gave none

func (*Asked) Acks

func (a *Asked) Acks() []Ack

The latest answer of each process asked that answered

func (*Asked) Close

func (a *Asked) Close() error

Removes the ask once it is settled and the processes had their look at it

func (*Asked) Go

func (a *Asked) Go(words string) error

Says the change was made: those asked to end end saying the words, the others are told them

func (*Asked) Gone

func (a *Asked) Gone() []Process

The processes asked whose lock is free now

func (*Asked) Off

func (a *Asked) Off(words string) error

Calls the ask off, nothing changed: every process goes on, told the words where it was told something

func (*Asked) Processes

func (a *Asked) Processes() []Process

The processes asked, the asker and those spared left out

func (*Asked) Wait

func (a *Asked) Wait(ctx context.Context) []Ack

Waits until every process asked to end answered ready or is gone, the deadline passed with a few seconds more for the last looks, or the context ended; the answers then

func (*Asked) Want

func (a *Asked) Want(p Process) Want

What the ask wants of the process

type Build

type Build struct {
	// As the build names it: v1.4.2, a prerelease such as v1.5.0-main.4, a pseudo version such as v1.4.3-0.20261201120000-abcdef123456,
	// empty for a build that names none
	Version string
	// Commit it was built from, 40 hex digits, empty when the build names none
	Commit string
	// Time of that commit, zero when unknown
	Time time.Time
	// Built from a tree with changes not committed
	Modified bool
	OS, Arch string
	// Go toolchain it was built with
	Go string
	// Build tags, linker flags and CGO_ENABLED as given to go build, which a rebuild of a checkout gives again. A build with -trimpath
	// records no linker flags, so Flags is empty for one and Trimmed says so
	Tags, Flags, CGO string
	Trimmed          bool
	// State its stores write, 0 for a program that carries no mark of it
	Epoch int
}

What a program of icebath was built from, read from the build info of the program file without running it

func Read

func Read(program string) (Build, error)

Build of a program file, read without running it; an error a person reads for a file that is no program of icebath

func Running

func Running() Build

Build of this process

func (Build) Line

func (b Build) Line() string

One line naming the build whole: version, commit, OS and architecture, toolchain

func (Build) Published

func (b Build) Published() bool

A clean build of a tag a release was published under, a stable or a prerelease one, never a pseudo version

func (Build) Release

func (b Build) Release() bool

A clean build of a stable release tag vX.Y.Z

func (Build) Short

func (b Build) Short() string

Commit cut to the seven digits a person reads, empty when the build names none

func (Build) Shown

func (b Build) Shown() string

Version as a person reads it: 1.4.2, 1.5.0-main.4, 1.4.3-dev.abcdef1 for a build of a commit no tag names, dev.abcdef1 for one that names no version, with +changes for a build of a tree with changes not committed

type Completion

type Completion struct {
	Shell Shell
	// Shell as the completion command names it: bash, zsh, fish or powershell
	Script string
	Path   string
	// Startup files the line goes into, and the line, none for a shell that loads the file by itself, as bash-completion and fish do
	RC   []string
	Line string
}

Where the completion script of icebath goes for a family of shells, and the line of a startup file that loads it where the shell does not load scripts of that place by itself

func Completions

func Completions(home string) []Completion

Completions of icebath for the families of shells the person uses, as the person's own files: bash through the folder bash-completion reads, zsh through ~/.zfunc and a line of .zshrc that loads it once the completion system runs, fish through its completions folder, PowerShell through a script beside its profiles and a line of each profile there is (on Windows, of those already there, since an execution policy may keep a profile from running)

type Found

type Found struct {
	Shell Shell
	// The PATH the shell starts with holds the folder already
	Inherited bool
	// Files the family's lines go into that put the folder on PATH, those that do not, and of the first those whose line icebath marked
	Setting, Lacking, Marked []string
}

How a new shell of a family finds a folder on its PATH

func (Found) Finds

func (f Found) Finds() bool

Whether a new shell of the family, login or not, finds the folder

type Held

type Held struct {
	// Who keeps it, as Steward names it
	By string
	// Folder it keeps the program in, such as the package folder of WinGet
	Folder string
	// Version it records as installed, empty when it records none to read
	Version string
	// Installed for every user of the computer, so updated and removed by an administrator
	Machine bool
	// Command on the PATH it runs the program by, empty when none leads to the program
	Command string
	// Where it keeps its record of the program, such as the key of an Apps and Features entry; empty when it keeps none to read
	Record string
	// Its record of the program is gone, so it no longer knows the program is there and passes it by when it updates
	Lost bool
	// What makes it know the program again, whole sentences with the command
	Repair string
	// Why it can't update or remove the program now, such as the Python its environment was made with gone; empty when it can
	Unusable string
}

What the package manager holding the program keeps of it, read from its own records

type Install

type Install struct {
	// The running program, links followed, empty when the system can't say, and the id of its install
	Program, ID string
	// Folder an installer made for the program and stamped, the program's or the one above it; empty for none
	Tree  string
	Stamp Stamp
	// How it came here: the stamp's, else what owns the program, else a checkout, else a loose program
	Method Method
	// Who owns the program when icebath does not, as a person names it, such as Homebrew or a Debian package; empty when icebath owns it
	Steward string
	// Package the system's package manager holds the program in, for the words of its removal; empty for none
	Package string
	// Source checkout of icebath the program was built in, empty for none
	Checkout string
}

The install of this process: its program, and how it came onto this computer

func Current

func Current() Install

The install of this process

func Of

func Of(exe string) Install

The install of the program at the path

func (Install) Held

func (i Install) Held() (Held, bool)

What the package manager holding the program keeps of it, false for a program none holds or one whose records icebath does not read

func (Install) Owed

func (i Install) Owed(settings, part string) bool

Whether the first start after the install owes the part something in the settings folder: an installer finished, or a package manager put this version in place, and no start of this settings folder settled it for the part yet

func (Install) Owned

func (i Install) Owned() bool

Whether icebath removes its own program, which a package manager, an image or a checkout keeps for itself

func (Install) Removal

func (i Install) Removal() string

Words of what removes the program when icebath does not, whole sentences with the command; empty when icebath removes it itself

func (Install) Said

func (i Install) Said() string

How the program came onto this computer, as a person reads it at the start of a line

func (Install) Settle

func (i Install) Settle(ctx context.Context, settings, part string) error

Records that the part settled what the install owed it in the settings folder, until an installer finishes again

func (Install) System

func (i Install) System() bool

Whether the install is one for everyone of the computer, as the script makes it when it runs as root

func (Install) Updating

func (i Install) Updating() string

Words of what updates the program when icebath does not update it itself, whole sentences with the command; empty when it does, as for an install of the script, a loose program and a checkout, which the update builds anew

type Key

type Key struct {
	// Day it was added, and the day after which a release signed by it alone is refused, zero while it is in use
	Added, Retired time.Time
	// The key as PKIX PEM, as cosign public-key prints it: ECDSA P-256 or Ed25519
	PEM string
}

A public key the releases of icebath are signed with

func Trusted

func Trusted() ([]Key, error)

Keys this build trusts, the oldest first, which icebath.app publishes for a person to check a download with; an error names a key that does not read as one a release can be checked with

type Method

type Method string

How icebath came onto this computer

const (
	// The install script, which makes a folder of its own for the program
	Script     Method = "script"
	WinGet     Method = "winget"
	Scoop      Method = "scoop"
	Homebrew   Method = "homebrew"
	Chocolatey Method = "chocolatey"
	Nix        Method = "nix"
	Deb        Method = "dpkg"
	RPM        Method = "rpm"
	Pacman     Method = "pacman"
	APK        Method = "apk"
	Pip        Method = "pip"
	// A container image built from icebath's Dockerfile
	Image Method = "image"
	// Built in a source checkout of icebath
	Checkout Method = "checkout"
	// A build of one commit a developer gave out, which never updates
	Pinned Method = "pinned"
	// A program file nothing placed, such as one built and copied, or one go install put down
	Loose Method = ""
)

type Presence

type Presence struct {
	// contains filtered or unexported fields
}

This process in the record of the icebath processes, and the asks it answers

func Present

func Present(announce Announce, busy func() string, end func()) (*Presence, error)

Announces this process in the record of the icebath processes of this user for as long as it runs, and answers the asks made of it: busy says what is under way in this process that an ask to end waits for, empty when nothing; end ends this process as a stop signal ends it, after which Close says why. Never nil: a record that can't be written leaves the process unseen by the others, which the error says

func (*Presence) Asking

func (p *Presence) Asking(ask Ask) (*Asked, error)

Asks the processes the ask names, every one but this process, and those it spares left out

func (*Presence) Close

func (p *Presence) Close() error

Takes this process out of the record and says why it ended when an ask ended it; nothing for a process that never announced itself

func (*Presence) End

func (p *Presence) End(why string)

Ends this process as a stop signal ends it, Close saying why

func (*Presence) Heard

func (p *Presence) Heard() (Told, <-chan struct{})

What asks of others told this process last, and a channel closed once they tell it more

func (*Presence) Self

func (p *Presence) Self() Process

This process as the record has it

type Process

type Process struct {
	PID int `json:"pid"`
	// Start time as the system reads it, which tells this process from a later one given the same pid
	Start   int64   `json:"start,omitempty"`
	Purpose Purpose `json:"purpose"`
	// Install of its program, as ID names it, and the program, links followed
	Install string `json:"install"`
	Program string `json:"program"`
	Build   Build  `json:"build"`
	// Settings folder it uses and the profile it works on
	Settings   string     `json:"settings"`
	Profile    string     `json:"profile"`
	Supervisor Supervisor `json:"supervisor"`
	Since      time.Time  `json:"since"`
	// contains filtered or unexported fields
}

One icebath process of this user as it announced itself

func OfInstall

func OfInstall(processes []Process, id string) []Process

The processes of the install

func OfSettings

func OfSettings(processes []Process, dir string) []Process

The processes of the settings folder, compared with links followed and case folded where the system folds it

func Processes

func Processes() []Process

Every live icebath process of this user, this one included, in the order they started. The record of one that ended is removed as it is read

func (Process) Live

func (p Process) Live() bool

Whether the process still holds the lock of its record

type Provenance

type Provenance struct {
	Schema int `json:"schema"`
	// Image it was published as, such as ghcr.io/nickheyer/icebath
	Image string `json:"image"`
	// Version and commit of the program it was built with, the version without its v; empty when the build named none
	Version  string `json:"version"`
	Revision string `json:"revision"`
	// Program that runs its containers as the image was built for, docker unless the marker names another
	Manager string `json:"manager"`
	// The program of icebath the image carries, which the marker describes and no other; empty in a marker that names none
	Program string `json:"program"`
}

What the container image of icebath says of itself in its provenance marker, written when the image is built

func Marker

func Marker() (Provenance, bool, error)

Provenance marker of the container image this process runs in: whether there is one, and why the one there does not read

func (Provenance) Describes

func (p Provenance) Describes(exe string) bool

Whether the marker describes the program at the path: the program it names, links followed, or any program for a marker that names none

func (Provenance) Tag

func (p Provenance) Tag() string

Tag of the image a pull of a newer one of the same kind names: latest for a release, main for a build of main, the channel for a build of another channel

type Purpose

type Purpose string

What an icebath process is

const (
	// icebath server
	Server Purpose = "server"
	// The app, or a command run once
	Window Purpose = "window"
)

type Reason

type Reason string

Why processes are asked

const (
	Updating     Reason = "update"
	Uninstalling Reason = "uninstall"
)

type Shell

type Shell string

A family of shells that read the same startup files and take the same lines

const (
	// bash, which reads .bashrc when it is interactive and the first of .bash_profile, .bash_login and .profile at a login
	Bash Shell = "bash"
	// zsh, which reads its files in ZDOTDIR when that names a folder, else in the home
	Zsh Shell = "zsh"
	// The POSIX shells sh, dash, ash and ksh, which read .profile at a login, as display managers do
	Sh   Shell = "sh"
	Fish Shell = "fish"
	Nu   Shell = "nu"
	// csh and tcsh
	Csh Shell = "csh"
	// PowerShell on Linux and macOS; on Windows the user PATH of the registry stands for every shell
	Pwsh Shell = "pwsh"
)

func ShellOf

func ShellOf(program string) Shell

Family of a shell program by its name, such as bash of /bin/bash or -zsh of a login; empty for a program that is no shell icebath knows

func (Shell) Files

func (s Shell) Files(home string) []Startup

Startup files of the family under the home, in the order the shell reads them

func (Shell) Finds

func (s Shell) Finds(dir, home string, base []string) Found

How a new shell of the family finds the folder: through the PATH it starts with, the base, else through the lines of the files the family's lines go into, a login file of bash that reads .bashrc taking what .bashrc does

func (Shell) Targets

func (s Shell) Targets(home string) []string

Files of the family the marked lines go into: the interactive file and the login file a shell of the family reads, made when missing

func (Shell) Title

func (s Shell) Title() string

Name of the family as a person reads it

func (Shell) Used

func (s Shell) Used(home, login string) bool

Whether the person uses the family: it is their login shell, or a startup file of it, or the folder of its configuration, is there. The POSIX shells always are, as logins and display managers read .profile

type Stamp

type Stamp struct {
	Method Method
	// Version installed, the 40 hex digit commit it was built from, the repository it came from and the channel of its updates, the first
	// two kept current by an update that put a new program in place
	Version, Commit, Repository, Channel string
	// When the install finished, zero for one that never did
	Completed time.Time
	// Commands it put on the PATH, shell startup files it added the marked PATH line to, Windows user PATH entries it added and user
	// variables it set, and completion files it wrote
	Launchers, RCFiles, UserPath, UserVars, Completions []string
	// Programs the person left out of those the first start of the program installs, such as chromium
	Without []string
	// Key of the Apps and Features entry it registered on Windows, under the current user's Uninstall key
	Apps string
	// Package a package manager holds the program in, as the stamp its package installs names it, such as icebath-bin
	Package string
}

What an installer recorded of an install in its stamp

func ReadStamp

func ReadStamp(tree string) (Stamp, bool)

Stamp of the folder, false when it has none

type Startup

type Startup struct {
	Path string
	// Read by a login shell, such as the first one of a session or of a terminal of macOS, and by an interactive shell that is no login
	Login, Interactive bool
	// Read only when no earlier file of the shell marked First is there, as bash reads the first of its login files
	First bool
}

A startup file of a shell and when the shell reads it

type Supervisor

type Supervisor struct {
	Kind string `json:"kind,omitempty"`
	// The unit, the label, the name of the Windows service, or the service folder of runit
	Name string `json:"name,omitempty"`
	// systemd: user or system; launchd: the domain, such as gui/501 or system; runit: the folder of its services
	Scope string `json:"scope,omitempty"`
}

How a process runs under a program that starts it, and starts it again, empty Kind for none

func Supervised

func Supervised() Supervisor

How this process runs, empty Kind when nothing runs it

func (Supervisor) Said

func (s Supervisor) Said() string

The supervisor in words a person reads, such as the systemd user unit icebath.service; empty for none

type Told

type Told struct {
	Reason Reason
	Want   Want
	// What the ask said while it waited, then the words of Go or Off
	Words string
	Until time.Time
	// The asker said Go, or called the ask off when Off
	Done, Off bool
}

What asks of others told a process, for its windows

type Want

type Want string

What an ask wants of one process

const (
	// Finish what is under way within the deadline, answer ready, and end once the asker says Go
	End Want = "end"
	// Go on running, told the words once the asker says Go
	Notice Want = "notice"
	// Nothing: the asker, a window the asker spares, a server its service manager restarts
	Spare Want = "spare"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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