jobcontroller

package
v0.14.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JobManagerStatus_Init    = "init"
	JobManagerStatus_Running = "running"
	JobManagerStatus_Done    = "done"
)
View Source
const (
	JobDoneReason_StartupError = "startuperror"
	JobDoneReason_Gone         = "gone"
	JobDoneReason_Terminated   = "terminated"
)
View Source
const (
	JobConnStatus_Disconnected = "disconnected"
	JobConnStatus_Connecting   = "connecting"
	JobConnStatus_Connected    = "connected"
)
View Source
const (
	JobKind_Shell = "shell"
	JobKind_Task  = "task"
)
View Source
const AutoReconnectCooldown = 30 * time.Second
View Source
const AutoReconnectDelay = 1 * time.Second
View Source
const DefaultStreamRwnd = 64 * 1024
View Source
const DefaultTimeout = 2 * time.Second
View Source
const JobOutputFileName = "term"
View Source
const MetaKey_TotalGap = "totalgap"

Variables

This section is empty.

Functions

func AttachJobToBlock

func AttachJobToBlock(ctx context.Context, jobId string, blockId string) error

func CheckJobConnected

func CheckJobConnected(ctx context.Context, jobId string) (*waveobj.Job, error)

func DeleteJob

func DeleteJob(ctx context.Context, jobId string) error

func DetachJobFromBlock

func DetachJobFromBlock(ctx context.Context, jobId string, updateBlock bool) error

func DisconnectJob

func DisconnectJob(ctx context.Context, jobId string) error

func GetAllJobManagerStatus

func GetAllJobManagerStatus(ctx context.Context) ([]*wshrpc.JobManagerStatusUpdate, error)

func GetBlockJobStatus

func GetBlockJobStatus(ctx context.Context, blockId string) (*wshrpc.BlockJobStatusData, error)

func GetConnectedJobIds

func GetConnectedJobIds() []string

func GetJobConnStatus

func GetJobConnStatus(jobId string) string

func GetJobManagerStatus

func GetJobManagerStatus(ctx context.Context, jobId string) (string, error)

func GetNumJobsConnected

func GetNumJobsConnected() int

func GetNumJobsRunning

func GetNumJobsRunning() int

func HandleCmdJobExited

func HandleCmdJobExited(ctx context.Context, jobId string, data wshrpc.CommandJobCmdExitedData) error

func InitJobController

func InitJobController()

func IsBlockIdTermDurable

func IsBlockIdTermDurable(blockId string) bool

func IsBlockTermDurable

func IsBlockTermDurable(block *waveobj.Block) bool

this function must be kept up to date with getBlockTermDurableAtom in frontend/app/store/global.ts

func ReconnectJob

func ReconnectJob(ctx context.Context, jobId string, rtOpts *waveobj.RuntimeOpts) error

func ReconnectJobsForConn

func ReconnectJobsForConn(ctx context.Context, connName string) error

func SendBlockJobStatusEvent

func SendBlockJobStatusEvent(ctx context.Context, blockId string)

func SendInput

func SendInput(ctx context.Context, data wshrpc.CommandJobInputData) error

func SetJobConnStatus

func SetJobConnStatus(jobId string, status string)

func StartJob

func StartJob(ctx context.Context, params StartJobParams) (string, error)

func TerminateAndDetachJob

func TerminateAndDetachJob(ctx context.Context, jobId string)

func TerminateJobManager

func TerminateJobManager(ctx context.Context, jobId string) error

Types

type StartJobParams

type StartJobParams struct {
	ConnName string
	JobKind  string
	Cmd      string
	Args     []string
	Env      map[string]string
	TermSize *waveobj.TermSize
	BlockId  string
}

Jump to

Keyboard shortcuts

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