Documentation
¶
Overview ¶
Package supervisor is the executor server's TLS and command supervision.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableCommandExecution ¶
func EnableCommandExecution() error
EnableCommandExecution reports that the workload helper is Linux-only.
func ServerKeepalive ¶
func ServerKeepalive(k kubernetes.ExecutorKeepalive) []grpc.ServerOption
ServerKeepalive closes a connection, cancelling its calls, when a ping goes unanswered.
func ServerTLSConfig ¶
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.
Types ¶
type CommandSupervisor ¶
type CommandSupervisor struct{}
CommandSupervisor refuses every command off Linux.
func NewCommandSupervisor ¶
func NewCommandSupervisor([]string, []string, string) *CommandSupervisor
NewCommandSupervisor returns a supervisor that refuses every command.
func (*CommandSupervisor) ReapOrphans ¶
func (*CommandSupervisor) ReapOrphans(ctx context.Context, _ time.Duration)
ReapOrphans returns when ctx ends.
type WorkspaceHealth ¶
WorkspaceHealth is a gRPC health server that reports the server and its services SERVING only while the workspace accepts a new file in time.
func NewWorkspaceHealth ¶
func NewWorkspaceHealth(root string, services ...string) *WorkspaceHealth
NewWorkspaceHealth reports root and services NOT_SERVING until Run's first check.
func (*WorkspaceHealth) Run ¶
func (h *WorkspaceHealth) Run(ctx context.Context)
Run checks the workspace every interval until ctx ends. A check blocked past its timeout is abandoned, and no other starts until it returns, so stuck storage holds at most one goroutine.