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 ¶
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.
Click to show internal directories.
Click to hide internal directories.