Documentation ¶
Index ¶
- Variables
- type ExecResult
- type ExecResultParser
- type ExecStatus
- type OutputParser
- type Worker
- func (w *Worker) CopyContentToContainer(content []byte, name string) error
- func (w *Worker) CopyFileToContainer(src, dst string) error
- func (w *Worker) CopyTo(filename string, dist *Worker) error
- func (w *Worker) Remove() error
- func (w *Worker) Run(input string, parseOutput bool) (*ExecResult, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExecResultParse = errors.New("exec result parse error")
View Source
var (
ErrTimeTextParse = errors.New("time.txtの内容がパースできません。")
)
Functions ¶
This section is empty.
Types ¶
type ExecResult ¶
type ExecResultParser ¶
type ExecResultParser struct {
// contains filtered or unexported fields
}
func NewExecResultParser ¶
func NewExecResultParser(w *Worker) (ExecResultParser, error)
func (*ExecResultParser) Next ¶
func (p *ExecResultParser) Next() (bool, *ExecResult, error)
type ExecStatus ¶
type ExecStatus int
const ( StatusFinished ExecStatus = 0 StatusTimeLimitExceeded ExecStatus = 1 StatusMemoryLimitExceeded ExecStatus = 2 StatusRuntimeError ExecStatus = 3 StatusUnknownError ExecStatus = 4 StatusOutputLimitExceeded ExecStatus = 5 Workspace = "/tmp/koj-workspace/" JudgeDataDir = Workspace + "judge_data" )
type OutputParser ¶
type OutputParser struct {
// contains filtered or unexported fields
}
type Worker ¶
type Worker struct { ID string TimeLimit time.Duration MemoryLimit int64 HostJudgeDataDir string // contains filtered or unexported fields }
func NewJudgementWorker ¶
func NewTimeoutWorker ¶
func (*Worker) CopyContentToContainer ¶
func (*Worker) CopyFileToContainer ¶
Click to show internal directories.
Click to hide internal directories.