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
func (s *Server) Attach(ctx context.Context, req *exec_v1alpha.SandboxExecAttach) error
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 ¶
func (s *Server) Exec(ctx context.Context, req *exec_v1alpha.SandboxExecExec) error