pause

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Banner() string

Banner returns a one-line paused notice or "" when active. Callers can unconditionally invoke and gate on empty.

func IsPaused

func IsPaused() bool

IsPaused: non-expired sentinel exists. Malformed sentinel = paused indefinitely (until `ctxcop resume`) — fail-closed-on-corruption.

func Pause

func Pause(durStr string, w io.Writer) error

Pause writes a sentinel with an expiry. durStr is a Go duration (10m, 2h, 30s) or "indefinite"/"forever".

func Remaining

func Remaining() time.Duration

Remaining returns time-until-expiry, or 0 if not paused / malformed.

func Resume

func Resume(w io.Writer) error

Resume removes the sentinel. Idempotent.

func Status

func Status(w io.Writer) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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