Documentation
¶
Overview ¶
Package executionexecutor is the fixed, credential-free workload helper.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableCommandExecution ¶
func EnableCommandExecution() error
EnableCommandExecution makes this process a Linux child subreaper. It must be called by the dedicated executor helper before it starts any other process.
func ServerTLSConfig ¶ added in v0.0.52
ServerTLSConfig returns a mutual TLS configuration presenting the key pair in certDir and admitting only clients that chain to the CA bundle in trustDir and carry its client URI. The trust directory is reread for every handshake.
func SuperviseCommand ¶ added in v0.0.52
SuperviseCommand is the per-command helper process. It reads a length-prefixed command from control, runs it with output on stdout and stderr, and stops it when control yields another byte or ends. It writes "started" and then "exit <code> <confirmed>" lines to status, or "noshell" when the shell is missing. The command can neither inherit status nor reopen it through /proc.
Types ¶
type CommandSupervisor ¶ added in v0.0.52
type CommandSupervisor struct {
// contains filtered or unexported fields
}
CommandSupervisor runs each command under its own helper process, a subreaper, so every process a command starts stays attributable to it while other commands run.
func NewCommandSupervisor ¶ added in v0.0.52
func NewCommandSupervisor(helper, env []string, dir string) *CommandSupervisor
NewCommandSupervisor runs helper, an argv whose process calls SuperviseCommand, with env in dir.
func (*CommandSupervisor) ReapOrphans ¶ added in v0.0.52
func (s *CommandSupervisor) ReapOrphans(ctx context.Context, interval time.Duration)
ReapOrphans kills and reaps, every interval until ctx ends, each child of this process that is not a helper. Orphans arrive here when a helper is killed and this process is a subreaper or PID 1.
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor serves one credential-free workload-helper process.
func (*Executor) Execute ¶
func (e *Executor) Execute(ctx context.Context, q executionenv.ExecutorRequest) (executionenv.ExecutorResponse, error)
Execute performs one bounded executor operation.