go-judge/types/run_task.go
2019-12-30 19:32:17 +08:00

46 lines
905 B
Go

package types
import "github.com/criyle/go-judge/file"
// 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 SourceCode
// ExecTask defines run tasks
type ExecTask struct {
// Executable
Exec *CompiledExec
// Run limits
TimeLimit uint64 // ms
MemoryLimit uint64 // kb
// Input / Output
InputFile file.File
AnswerFile file.File
// File I/O file names if not empty
InputFileName *string
OutputFileName *string
// Special Judge
SPJ *CompiledExec
// Interactor for interactive type
Interactor *CompiledExec
// UserAnswers for answer submission run task
UserAnswer []file.File
}