go-judge/runner/run_task.go
criyle 1f86f25995 Refactor & Documentation
- pkg/runner -> pkg/envexec
- add idea about executor server
2020-03-03 02:32:59 -05:00

51 lines
979 B
Go

package runner
import (
"time"
"github.com/criyle/go-judge/file"
"github.com/criyle/go-sandbox/runner"
)
// RunTask is used to send task into RunQueue,
// if taskqueue is a remote queue, taskqueue need to store / retrive files
type RunTask struct {
Type string // compile / standard / interactive / answer_submit
// Used for compile task
Compile *CompileTask
// Used for exec tasks
Exec *ExecTask
}
// CompileTask defines compile task
type CompileTask file.SourceCode
// ExecTask defines run tasks
type ExecTask struct {
// Executable
Exec *file.CompiledExec
// Run limits
TimeLimit time.Duration
MemoryLimit runner.Size
// Input / Output
InputFile file.File
AnswerFile file.File
// File I/O file names if not empty
InputFileName *string
OutputFileName *string
// Special Judge
SPJ *file.CompiledExec
// Interactor for interactive type
Interactor *file.CompiledExec
// UserAnswers for answer submission run task
UserAnswer []file.File
}