worker: require workers to declare job types they accept

For now, workers must send `[ "osbuild" ]`.
This commit is contained in:
Lars Karlitski 2020-09-20 17:40:18 +02:00 committed by Tom Gundersen
parent d3c99b8e93
commit ba6a480e32
5 changed files with 21 additions and 4 deletions

View file

@ -16,7 +16,9 @@ type Error struct {
}
// RequestJobJSONBody defines parameters for RequestJob.
type RequestJobJSONBody map[string]interface{}
type RequestJobJSONBody struct {
Types []string `json:"types"`
}
// UpdateJobJSONBody defines parameters for UpdateJob.
type UpdateJobJSONBody struct {