Documentation ¶
Overview ¶
Package invoker represents solve implementation for running asynchronious tasks like compiling and judging solutions.
Index ¶
- type CompileOptions
- type CompileReport
- type Compiler
- type CompilerManager
- type CompilerProcess
- type Executable
- type ExecuteOptions
- type ExecuteReport
- type Invoker
- type MountFile
- type Problem
- type ProblemExecutable
- type ProblemExecutableKind
- type ProblemKind
- type ProblemPointsPolicy
- type ProblemResource
- type ProblemStatement
- type ProblemTest
- type ProblemTestGroup
- type ProblemTestSet
- type TaskContext
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) CreateExecutable(binaryPath string) (Executable, error) }
type CompilerManager ¶
type CompilerProcess ¶
type CompilerProcess interface { Start() error Wait() (ExecuteReport, error) Release() error }
type Executable ¶
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, CompilerManager) error GetExecutables() ([]ProblemExecutable, error) GetTestSets() ([]ProblemTestSet, error) GetStatements() ([]ProblemStatement, error) }
type ProblemExecutable ¶
type ProblemExecutable interface { Name() string Kind() ProblemExecutableKind OpenBinary() (*os.File, error) GetCompiler(context.Context, CompilerManager) (Compiler, error) }
type ProblemExecutableKind ¶
type ProblemExecutableKind string
const ( TestlibChecker ProblemExecutableKind = "testlib_checker" TestlibInteractor ProblemExecutableKind = "testlib_interactor" )
type ProblemKind ¶
type ProblemKind string
const ( PolygonProblem ProblemKind = "polygon" CompiledProblem ProblemKind = "compiled" )
type ProblemPointsPolicy ¶
type ProblemPointsPolicy string
const ( EachTestPointsPolicy ProblemPointsPolicy = "each_test" CompleteGroupPointsPolicy ProblemPointsPolicy = "complete_group" )
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 PointsPolicy() ProblemPointsPolicy }
type ProblemTestSet ¶
type ProblemTestSet interface { Name() string TimeLimit() int64 MemoryLimit() int64 GetTests() ([]ProblemTest, error) GetGroups() ([]ProblemTestGroup, 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.