execproxy

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunManager added in v0.14.0

type RunManager interface {
	// CreateRunEntity records a run and returns its id and the name its first
	// attempt's sandbox will have.
	CreateRunEntity(ctx context.Context, app, task string, command []string, tty bool) (entity.Id, string, error)
	// CancelRunEntity requests cancellation of a run, reporting whether the
	// request was recorded (false if it was already terminal).
	CancelRunEntity(ctx context.Context, runID string) (bool, error)
}

RunManager creates and cancels durable runs in-process. The exec proxy uses it on the legacy exec-by-app compatibility path so a run is created (and, when abandoned, canceled) with the caller's own identity rather than the coordinator's. *app.AppInfo satisfies it.

type Server

type Server struct {
	Log *slog.Logger
	EAC *entityserver_v1alpha.EntityAccessClient
	// contains filtered or unexported fields
}

func NewServer

func NewServer(
	log *slog.Logger,
	eac *entityserver_v1alpha.EntityAccessClient,
	rs *rpc.State,
	runs RunManager,
) *Server

func (*Server) Attach added in v0.14.0

Attach forwards a client's attach request to the node running the sandbox.

Unlike the exec path this proxy creates nothing and deletes nothing. The sandbox it attaches to is owned by whatever created it -- for a task run, the run controller -- and outlives any particular client. That is what makes disconnecting safe: there is no cleanup closure here whose absence could strand a sandbox, and no request handler whose death takes one with it.

func (*Server) Exec

Jump to

Keyboard shortcuts

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