Documentation
¶
Overview ¶
Package reason holds the words a run states about itself: why it wrote no rows, what to do about the error its agent ended in, and the reader's error line. The runner writes them and a comment shows them, so they live apart from both.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentErrorFix ¶
func AgentErrorFix(class adapter.AgentError) string
AgentErrorFix says what to do about an agent error of the class given, empty for a class outside the closed list.
func AgentErrorLine ¶
func AgentErrorLine(class adapter.AgentError) string
AgentErrorLine is an agent error's class and its fix, in one line.
func ReaderLine ¶
ReaderLine is the first line of a reader's error, as a result object and a comment carry it. The error can quote the agent's stream, so every character outside readerLineCharacters becomes ?, and the line is cut at maxReaderLine bytes.
Types ¶
type Reason ¶
type Reason string
Reason says why a run wrote no rows. Its values are a closed list, each with one sentence, so a reader of an empty rows file can name the cause.
const ( // NoUsage is a run whose agent ended and reported no usage. NoUsage Reason = "no_usage" // ConcurrentRun is a run refused before its agent started, because // another run held the agent's state directory. ConcurrentRun Reason = "concurrent_run" // ReaderRefused is a run whose reader refused the agent's stream or // its execution file, so no usage was read. ReaderRefused Reason = "reader_refused" // AgentError is a run whose agent ended in an error before it // reported any usage. The run's result names the error's class. AgentError Reason = "agent_error" )
The reasons a run writes no rows.