2015-05-05 08:04:20 +00:00
|
|
|
package runner
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
|
|
|
|
"github.com/drone/drone/common"
|
2015-05-17 18:42:56 +00:00
|
|
|
"github.com/drone/drone/pkg/queue"
|
2015-05-05 08:04:20 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Runner interface {
|
|
|
|
Run(work *queue.Work) error
|
2015-05-11 07:45:31 +00:00
|
|
|
Cancel(*common.Build) error
|
|
|
|
Logs(*common.Build) (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-05-11 07:45:31 +00:00
|
|
|
SetCommit(*common.User, *common.Repo, *common.Commit) error
|
|
|
|
SetBuild(*common.Repo, *common.Commit, *common.Build) error
|
|
|
|
SetLogs(*common.Repo, *common.Commit, *common.Build, io.ReadCloser) error
|
2015-05-05 08:04:20 +00:00
|
|
|
}
|