| 1 |
package launcher |
| 2 |
|
| 3 |
import "fmt" |
| 4 |
|
| 5 |
// RetryableError means launcher should reboot the VM to retry. |
| 6 |
type RetryableError struct { |
| 7 |
Err error |
| 8 |
} |
| 9 |
|
| 10 |
// WorkloadError represents the result of an workload/task that is non-zero. |
| 11 |
type WorkloadError struct { |
| 12 |
ReturnCode uint32 |
| 13 |
} |
| 14 |
|
| 15 |
func (e *RetryableError) Error() string { |
| 16 |
return fmt.Sprintf("failed with retryable error: %v", e.Err.Error()) |
| 17 |
} |
| 18 |
|
| 19 |
func (e *WorkloadError) Error() string { |
| 20 |
return "workload finished with a non-zero return code" |
| 21 |
} |