2015-05-05 08:04:20 +00:00
|
|
|
package runner
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
|
2015-05-17 18:42:56 +00:00
|
|
|
"github.com/drone/drone/pkg/queue"
|
2015-06-19 00:36:52 +00:00
|
|
|
"github.com/drone/drone/pkg/types"
|
2015-05-05 08:04:20 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Runner interface {
|
|
|
|
Run(work *queue.Work) error
|
2015-06-19 00:36:52 +00:00
|
|
|
Cancel(*types.Job) error
|
|
|
|
Logs(*types.Job) (io.ReadCloser, error)
|
2015-05-05 08:04:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Updater defines a set of functions that are required for
|
|
|
|
// the runner to sent Drone updates during a build.
|
|
|
|
type Updater interface {
|
2015-06-23 03:45:08 +00:00
|
|
|
SetBuild(*types.User, *types.Repo, *types.Build) error
|
|
|
|
SetJob(*types.Repo, *types.Build, *types.Job) error
|
|
|
|
SetLogs(*types.Repo, *types.Build, *types.Job, io.ReadCloser) error
|
2015-05-05 08:04:20 +00:00
|
|
|
}
|