worker: add new container resolve job type

This is a new job that can be used to resolve containers. It uses
the existing `container.Resolver` class to do the actual work.
This commit is contained in:
Christian Kellner 2022-07-21 17:18:40 +02:00
parent c2f3f76d96
commit 50e630a76f
5 changed files with 115 additions and 8 deletions

View file

@ -30,6 +30,7 @@ const (
ErrorJobMissingHeartbeat ClientErrorCode = 27
ErrorTargetError ClientErrorCode = 28
ErrorParsingJobArgs ClientErrorCode = 29
ErrorContainerResolution ClientErrorCode = 30
)
type ClientErrorCode int
@ -83,6 +84,8 @@ func GetStatusCode(err *Error) StatusCode {
return JobStatusUserInputError
case ErrorEmptyManifest:
return JobStatusUserInputError
case ErrorContainerResolution:
return JobStatusUserInputError
default:
return JobStatusInternalError
}