job

package
v2.2.0-20240131 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadCache

func ReadCache(job types.ZadigJobTask, dest, cacheDir string, logger *zap.SugaredLogger)

func WriteCache

func WriteCache(job types.ZadigJobTask, src string, cachePath string, logger *zap.SugaredLogger)

Types

type JobExecutor

type JobExecutor struct {
	Ctx              context.Context
	Wg               *sync.WaitGroup
	Cmd              *common.Command
	Job              *types.ZadigJobTask
	JobCtx           *jobctl.JobContext
	Client           *network.ZadigClient
	Logger           *log.JobLogger
	Writer           *io.Writer
	Reporter         *reporter.JobReporter
	DockerHost       string
	JobResult        *types.JobExecuteResult
	OutputsJsonBytes []byte
	Cancel           *bool
	FinishedChan     chan struct{}
	ReporterCancel   context.CancelFunc
	Dirs             *types.AgentWorkDirs
}

func NewJobExecutor

func NewJobExecutor(ctx context.Context, job *types.ZadigJobTask, client *network.ZadigClient, reporterCancel context.CancelFunc) *JobExecutor

func (*JobExecutor) AfterExecute

func (e *JobExecutor) AfterExecute() error

func (*JobExecutor) BeforeExecute

func (e *JobExecutor) BeforeExecute() error

BeforeExecute init execute context and command

func (*JobExecutor) CheckZadigCancel

func (e *JobExecutor) CheckZadigCancel() bool

func (*JobExecutor) Execute

func (e *JobExecutor) Execute()

func (*JobExecutor) InitWorkDirectory

func (e *JobExecutor) InitWorkDirectory() error

func (*JobExecutor) StopJob

func (e *JobExecutor) StopJob() error

Jump to

Keyboard shortcuts

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