Documentation
¶
Overview ¶
Package invoker represents solve implementation for running asynchronious tasks like compiling and judging solutions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompileOptions ¶
type CompileReport ¶
func (CompileReport) Success ¶
func (r CompileReport) Success() bool
type Compiler ¶
type Compiler interface {
Name() string
Compile(ctx context.Context, options CompileOptions) (CompileReport, error)
Execute(ctx context.Context, options ExecuteOptions) (ExecuteReport, error)
}
type ExecuteOptions ¶
type ExecuteReport ¶
func (ExecuteReport) Success ¶
func (r ExecuteReport) Success() bool
type Invoker ¶
type Invoker struct {
// contains filtered or unexported fields
}
Invoker represents manager for asynchronous actions (invocations).
type Problem ¶
type Problem interface {
Compile(context.Context) error
GetExecutables() ([]ProblemExecutable, error)
GetTestGroups() ([]ProblemTestGroup, error)
GetStatements() ([]ProblemStatement, error)
}
type ProblemExecutable ¶
type ProblemExecutableKind ¶
type ProblemExecutableKind string
const (
TestlibChecker ProblemExecutableKind = "testlib_checker"
)
type ProblemKind ¶
type ProblemKind string
const ( PolygonProblem ProblemKind = "polygon" CompiledProblem ProblemKind = "compiled" )
type ProblemResource ¶
type ProblemStatement ¶
type ProblemStatement interface {
Locale() string
GetConfig() (models.ProblemStatementConfig, error)
GetResources() ([]ProblemResource, error)
}
type ProblemTest ¶
type ProblemTestGroup ¶
type ProblemTestGroup interface {
Name() string
TimeLimit() int64
MemoryLimit() int64
GetTests() ([]ProblemTest, error)
}
type TaskContext ¶
type TaskContext interface {
context.Context
Kind() models.TaskKind
Status() models.TaskStatus
ScanConfig(models.TaskConfig) error
ScanState(any) error
SetStatus(context.Context, models.TaskStatus) error
SetState(context.Context, any) error
SetDeferredState(any) error
Ping(context.Context, time.Duration) error
Logger() *logs.Logger
}
Click to show internal directories.
Click to hide internal directories.