Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrAuthFailed = errors.New("authentication failed") ErrNoPeer = fmt.Errorf("%w: no peer in context", ErrAuthFailed) ErrNoTLSInfo = fmt.Errorf("%w: no TLSInfo auth info", ErrAuthFailed) ErrNoClientCert = fmt.Errorf("%w: no client certificate in auth info", ErrAuthFailed) ErrNoCNInCert = fmt.Errorf("%w: no CN in client certificate", ErrAuthFailed) )
Functions ¶
func ProcSelfArgMaker ¶
func ProcSelfArgMaker(jd job.JobDescription) (cmd string, args []string)
ProcSelfArgMaker returns a command line to run the job in a container. This runs ourself as "/proc/self/exe rc ..."
Types ¶
type CmdList ¶
type CmdList struct { All bool `short:"a" help:"List all user's jobs"` Completed bool `short:"c" help:"List completed as well as running jobs"` // contains filtered or unexported fields }
CmdList is a kong struct describing the flags and arguments for the `jobber list` subcommand.
type CmdLogs ¶
type CmdLogs struct { Follow bool `short:"f" help:"Stream logs continuously as they are produced"` NoTimestamps bool `short:"T" help:"Do not output timestamps on lines"` JobID string `arg:"" help:"ID of job to fetch logs from"` // contains filtered or unexported fields }
CmdLogs is a kong struct describing the flags and arguments for the `jobber logs` subcommand.
type CmdRun ¶
type CmdRun struct { Detach bool `short:"d" help:"Detach from output when running" xor:"ts"` NoTimestamps bool `short:"T" help:"Do not output timestamps on lines" xor:"ts"` job.JobSpec // contains filtered or unexported fields }
CmdRun is a kong struct describing the flags and arguments for the `jobber run` subcommand.
func (*CmdRun) Run ¶
Run is the entrypoint for the `jobber run` cli command. It packages the command line arguments into a `RunRequest` message and calls the `JobExecutor.Run()` method. If the detach flag is not specified, it calls the `JobExecutor.Logs()` method after a successful run to stream back the logs of the run command.
It is called by kong after parsing the command line.
type CmdRunContainer ¶
CmdRunContainer is a hidden entrypoint for the jobber server to be able to run a child process in the correct namespaces so it can first set up those namespaces and cgroups.
func (*CmdRunContainer) Run ¶
func (cmd *CmdRunContainer) Run() error
CmdRunContainer implements `jobber rc` to execute part 2 of the container running process - setting up the cgroup(s) and namespace(s) and execing the job's command.
type CmdRunJob ¶
CmdRunJob is a hidden entrypoint just for testing the container runner without needing the while jobber server. It is not intended to be user- facing.
type CmdServe ¶
type CmdServe struct { Listen string `short:"l" default:":8443" help:"TCP listen address"` Admin []string `help:"admin users with full privileges"` TLSCert string `name:"tls-cert" default:"certs/server.crt" help:"TLS server cert"` TLSKey string `name:"tls-key" default:"certs/server.key" help:"TLS server key"` CACert string `name:"ca-cert" default:"certs/ca.crt" help:"CA for authenticating users"` }
CmdServe is a kong struct describing the flags and arguments for the `jobber serve` subcommand.
type CmdShutdown ¶
type CmdShutdown struct {
// contains filtered or unexported fields
}
func (*CmdShutdown) Run ¶
func (cmd *CmdShutdown) Run() error
type CmdStatus ¶
type CmdStatus struct { JobID string `arg:"" help:"ID of job to get status of"` // contains filtered or unexported fields }
CmdStatus is a kong struct describing the flags and arguments for the `jobber status` subcommand.
type CmdStop ¶
type CmdStop struct { Cleanup bool `short:"c" help:"Remove job from jobber server after stopping. Can be used on already stopped job"` JobID string `arg:"" help:"ID of job to stop"` // contains filtered or unexported fields }
CmdStop is a kong struct describing the flags and arguments for the `jobber stop` subcommand.