cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package cli builds the cobra command tree. Keeping the tree in a dedicated package (rather than inside cmd/akashi) makes it testable without spawning a binary.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnhealthy = errors.New("server not healthy")

ErrUnhealthy is returned by check when a probed server is not healthy. It is distinct from cobra usage errors so Execute can map it to exit code 1 rather than 2.

Functions

func Execute

func Execute(stdout, stderr io.Writer, args []string) int

Execute is the single entry point cmd/akashi/main.go calls. It returns the process exit code rather than calling os.Exit, so main stays testable.

Exit codes:

0 - healthy
1 - degraded, dead, or unknown (a real health finding)
2 - invocation error (bad flags, or the registry lookup itself failed).
    Probe-time network failures fold into the verdict (0/1), not this code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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