waiting

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 7 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 waiting renders the minutes a workspace takes to come up. The wait has no useful output of its own, so it carries the things a new user would otherwise have to go read.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Notes

func Notes(boxHost string) []string

Notes is the rotation shown during a wait, with {box} replaced by the host of Zerops Box that `zbox workspace console` opens.

Types

type Screen

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

Screen is the plain text view of a wait that takes minutes and produces almost no output of its own. A terminal that prints one line and then goes quiet reads as a hang, so every stage prints a line and, on a TTY, a note about workspaces follows every few seconds. Nothing is redrawn, the lines scroll like any other output.

func New

func New(boxHost string) *Screen

New takes the host of Zerops Box, which a note names.

func (*Screen) Pause

func (s *Screen) Pause()

Pause holds the notes while the caller prints and reads on the terminal, such as the browser hand-over, a note arriving in the middle of a prompt would be confusing. Resume lets them go on.

func (*Screen) Resume

func (s *Screen) Resume()

func (*Screen) Start

func (s *Screen) Start()

Start begins the notes. A pipe or a CI log gets the steps only, a tip about parking sandboxes is noise there.

func (*Screen) Step

func (s *Screen) Step(text string)

Step names what is being waited for. The trailing dots are added here rather than in every step string, a step is a name and the fact that it is still running is the screen's business.

func (*Screen) Stop

func (s *Screen) Stop()

Stop ends the notes. It is safe to call twice, the caller defers it and the happy path calls it before printing the result.

Jump to

Keyboard shortcuts

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