debian-forge-composer/internal/jobqueue/local_target_uploader.go
Ondřej Budai 6902f730cb worker: upload local target image using jobqueue api
Prior this commit local target copied the image from a worker to a composer
using cp(1) command. This prevented the local target to work on remote
workers.

This commit switches the local target implementation to using the jobqueue
API introduced in the previous commit. I had some concerns about speed
of this solution (imho nothing can beat pure cp(1) implementation) but
ad hoc sanity tests showed the copying of the image using the jobqueue API
when running the worker on the same machine as the composer is still
more or less instant.
2020-02-14 11:53:38 +01:00

7 lines
117 B
Go

package jobqueue
import "io"
type LocalTargetUploader interface {
UploadImage(job *Job, reader io.Reader) error
}