supervisor

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 27 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 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

func ServerTLSConfig(certDir, trustDir string) (*tls.Config, error)

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

func SuperviseCommand(io.Reader, *os.File, *os.File, *os.File) error

SuperviseCommand reports that command supervision is Linux-only.

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.

func (*CommandSupervisor) Start

Start implements commands.Runner.

type WorkspaceHealth

type WorkspaceHealth struct {
	*health.Server
	// contains filtered or unexported fields
}

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.

Jump to

Keyboard shortcuts

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