Documentation
¶
Overview ¶
Package exitcode defines the process exit codes of data export and import and maps errors to them.
Index ¶
Constants ¶
const ( // ExitUsage is a parameter or usage error. ExitUsage = 1 // ExitPreflight is a read-only preflight rejection: nothing was written anywhere. ExitPreflight = 2 // ExitRuntime is a failure during execution, after the preflight passed. ExitRuntime = 3 // ExitVerify is an import whose --verify found the target's row counts inconsistent with // the rows sent, or could not complete the check. ExitVerify = 4 // ExitPlanChanged is an import stopped by --abort-on-plan-change: the plan re-checked after // writing the schema differed, so the schema is written but no data was sent. ExitPlanChanged = 5 // ExitResume is a resume that is impossible: the progress file is unusable, a binding // differs, the export session is gone, the exported schema changed, or the plan differs // from the recorded one. No data was sent, nothing was deleted, and the progress file is // kept; an import may have written the schema already. ExitResume = 6 // ExitHalted is an import halted by its resume duplication policy (block); what was // imported before is valid. ExitHalted = 7 )
Exit codes of data export and import; codes 1 to 3 and 6 are shared, 4, 5 and 7 are import only.
Variables ¶
This section is empty.
Functions ¶
func For ¶
For maps an error to the exit code of its cause: an ExitError keeps its code, INVALID_ARGUMENT is a usage error, a refusal the server made before writing anything (permission, authentication, precondition, not found, or UNIMPLEMENTED from a server without data export) is a preflight rejection, and everything else failed at run time.