Documentation
¶
Overview ¶
Package exitcode defines the process exit codes clusterctl guarantees.
The codes are part of the command line contract: scripts branch on them, so they may be added to but never renumbered.
Index ¶
Constants ¶
const ( // OK means every target succeeded. OK = 0 // TargetFailed means clusterctl ran correctly but at least one target // reported a failure. TargetFailed = 1 // Usage means the command line or the configuration was rejected before // anything was contacted. Usage = 2 // Transport means a host could not be reached, authenticated with, or // stayed reachable for the duration of the command. Transport = 3 // Interrupted means the command was cancelled, by a signal or by a // declined confirmation prompt. Interrupted = 130 )
Variables ¶
This section is empty.
Functions ¶
func Class ¶ added in v0.4.0
Class is the class of progress an error that fits none of the first rules of progress.Classify gets, the class of the exit code it asks for, as CodeClass tells. It is the fallback every Bus of clusterctl's is made with, progress.Options.Classify, so that a span ends as the command would exit.
func CodeClass ¶ added in v0.4.0
CodeClass is the class of work that failed with the exit code code: Transport is progress.ClassTransport, Usage progress.ClassUsage, Interrupted progress.ClassCanceled, and any other but OK, which is no failure, progress.ClassTarget.
func Default ¶ added in v0.4.0
Default gives an error the exit code code, unless it asks for one already.
func From ¶
From reports the exit code an error should produce. Errors that carry no code of their own count as a target failure.