Files
coder/provisionersdk/errors.go
Steven Masley 3194bcfc9e chore: distinct operations for provisioner's 'parse', 'init', 'plan', 'apply', 'graph' (#21064)
Provisioner steps broken into smaller granular actions.
Changes:
- `ExtractArchive` moved to `init` request (was in `configure`)
- Writing `tfstate` moved to `plan` (was in `configure`)
- Moved most plan/apply outputs to `GraphComplete`
2025-12-15 11:26:41 -06:00

28 lines
771 B
Go

package provisionersdk
import (
"fmt"
"github.com/coder/coder/v2/provisionersdk/proto"
)
func ParseErrorf(format string, args ...any) *proto.ParseComplete {
return &proto.ParseComplete{Error: fmt.Sprintf(format, args...)}
}
func InitErrorf(format string, args ...any) *proto.InitComplete {
return &proto.InitComplete{Error: fmt.Sprintf(format, args...)}
}
func PlanErrorf(format string, args ...any) *proto.PlanComplete {
return &proto.PlanComplete{Error: fmt.Sprintf(format, args...)}
}
func ApplyErrorf(format string, args ...any) *proto.ApplyComplete {
return &proto.ApplyComplete{Error: fmt.Sprintf(format, args...)}
}
func GraphError(format string, args ...any) *proto.GraphComplete {
return &proto.GraphComplete{Error: fmt.Sprintf(format, args...)}
}