executor

package
v1.0.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func ParseGitAccess(s string) (GitAccess, error)

ParseGitAccess reads a configured access level. Empty is GitNone.

func (GitAccess) Authenticated

func (a GitAccess) Authenticated() bool

Authenticated reports whether sessions reach git repositories, as the host.

func (GitAccess) CanPush

func (a GitAccess) CanPush() bool

CanPush reports whether sessions may push.

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.
Package platform runs an accepted offer as one kagent session and A2A turn.
Package platform runs an accepted offer as one kagent session and A2A turn.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL