Documentation
¶
Overview ¶
Package executor is the boundary between an accepting runner and its sessions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface {
// Start starts a session for the offer and returns once the session runs
// or fails to start. The session reports progress and its outcome through
// report until it ends; report is safe to call from any goroutine.
Start(ctx context.Context, offer runnerapi.Offer, report func(runnerapi.SessionReport)) error
// Cancel stops the task's session. The session's final report is
// Canceled once the executor observed it stopped.
Cancel(ctx context.Context, task string) error
}
Executor runs agent sessions on one runner. The runner calls it after it accepted an offer; it never talks to Beekeeper itself.
type GitAccess ¶
type GitAccess string
GitAccess is the git power a runner lends its sessions. The zero value lends none.
const ( // GitNone gives sessions no git: no checkout, fetch, push or credential. GitNone GitAccess = "none" // GitRead lends the host's git login for fetching. Sessions cannot push. GitRead GitAccess = "read" // GitWrite lends the host's git login for fetching and pushing. GitWrite GitAccess = "write" )
func ParseGitAccess ¶
ParseGitAccess reads a configured access level. Empty is GitNone.
func (GitAccess) Authenticated ¶
Authenticated reports whether sessions reach git repositories, as the host.
type Resumer ¶
type Resumer interface {
// Pending lists recorded tasks that may still owe the coordinator an outcome.
Pending() ([]string, error)
// Resume reattaches to the recorded task after the coordinator confirms
// ownership. Its context and report callback have the same lifetime as Start's.
Resume(ctx context.Context, task string, report func(runnerapi.SessionReport)) error
}
Resumer is implemented by executors whose sessions survive a runner restart.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package fake runs timed, in-memory sessions for exercising the runner API.
|
Package fake runs timed, in-memory sessions for exercising the runner API. |
|
Package local runs accepted sessions in digest-pinned Linux containers on the runner's machine.
|
Package local runs accepted sessions in digest-pinned Linux containers on the runner's machine. |