harness-drone/pkg/runner/runner.go

23 lines
579 B
Go
Raw Normal View History

package runner
import (
"io"
2015-05-17 18:42:56 +00:00
"github.com/drone/drone/pkg/queue"
2015-05-17 20:51:42 +00:00
common "github.com/drone/drone/pkg/types"
)
type Runner interface {
Run(work *queue.Work) error
Cancel(*common.Build) error
Logs(*common.Build) (io.ReadCloser, error)
}
// Updater defines a set of functions that are required for
// the runner to sent Drone updates during a build.
type Updater interface {
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
}