woodpecker/pkg/runner/runner.go

23 lines
547 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-06-19 00:36:52 +00:00
"github.com/drone/drone/pkg/types"
)
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)
}
// Updater defines a set of functions that are required for
// the runner to sent Drone updates during a build.
type Updater interface {
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
}