Documentation
¶
Overview ¶
Package clisignal shares process interruption semantics between CLI entrypoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Interruption ¶
type Interruption struct {
// contains filtered or unexported fields
}
func NewInterruption ¶
func NewInterruption(sig os.Signal) *Interruption
NewInterruption retains the first signal as the primary cancellation cause.
func (*Interruption) Error ¶
func (e *Interruption) Error() string
func (*Interruption) ExitCode ¶
func (e *Interruption) ExitCode() int
func (*Interruption) Subtype ¶
func (e *Interruption) Subtype() string
func (*Interruption) Unwrap ¶
func (e *Interruption) Unwrap() error
func (*Interruption) WithCancellationDetail ¶
func (e *Interruption) WithCancellationDetail(err error) *Interruption
WithCancellationDetail keeps the signal as the primary process error while retaining actionable context from a command that stopped because of that signal. Plain context cancellation and nested signal errors add no useful detail, and unrelated command failures must not be relabelled as part of the interruption. The detail is deliberately not exposed through Unwrap so an inner structured error cannot override the signal's exit code or subtype.
Click to show internal directories.
Click to hide internal directories.