worker: require workers to declare job types they accept
For now, workers must send `[ "osbuild" ]`.
This commit is contained in:
parent
d3c99b8e93
commit
ba6a480e32
5 changed files with 21 additions and 4 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -83,6 +83,15 @@ paths:
|
|||
schema:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
types:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- osbuild
|
||||
required:
|
||||
- types
|
||||
description: ''
|
||||
description: Requests a job. This operation blocks until a job is available.
|
||||
parameters: []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue