target: add constructor

We only support local target for now, but this avoids having to
open code it.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2019-09-27 15:54:13 +02:00
parent f880581a14
commit 5df6874b94
5 changed files with 20 additions and 19 deletions

View file

@ -84,7 +84,7 @@ func (api *API) addJobHandler(writer http.ResponseWriter, request *http.Request,
}
type replyBody struct {
Pipeline pipeline.Pipeline `json:"pipeline"`
Targets []target.Target `json:"targets"`
Targets []*target.Target `json:"targets"`
}
contentType := request.Header["Content-Type"]