mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 17:00:30 +00:00
15 lines
259 B
Go
15 lines
259 B
Go
package worker
|
|
|
|
import (
|
|
"code.google.com/p/go.net/context"
|
|
)
|
|
|
|
type Worker interface {
|
|
Do(context.Context, *Work)
|
|
}
|
|
|
|
// Do retrieves a worker from the session and uses
|
|
// it to get work done.
|
|
func Do(c context.Context, w *Work) {
|
|
FromContext(c).Do(c, w)
|
|
}
|