github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/pkg/model/v1beta1/command.go (about)

     1  package v1beta1
     2  
     3  type RunCommandResult struct {
     4  	// stdout of the run. Yaml provided for `describe` output
     5  	STDOUT string `json:"stdout"`
     6  
     7  	// bool describing if stdout was truncated
     8  	StdoutTruncated bool `json:"stdouttruncated"`
     9  
    10  	// stderr of the run.
    11  	STDERR string `json:"stderr"`
    12  
    13  	// bool describing if stderr was truncated
    14  	StderrTruncated bool `json:"stderrtruncated"`
    15  
    16  	// exit code of the run.
    17  	ExitCode int `json:"exitCode"`
    18  
    19  	// Runner error
    20  	ErrorMsg string `json:"runnerError"`
    21  }
    22  
    23  func NewRunCommandResult() *RunCommandResult {
    24  	return &RunCommandResult{
    25  		STDOUT:          "",    // stdout of the run.
    26  		StdoutTruncated: false, // bool describing if stdout was truncated
    27  		STDERR:          "",    // stderr of the run.
    28  		StderrTruncated: false, // bool describing if stderr was truncated
    29  		ExitCode:        -1,    // exit code of the run.
    30  	}
    31  }