tasks

package
v0.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompileRequest added in v0.25.0

type CompileRequest struct {
	// TODO: Better identifier for such requests
	ID          int
	CodeFiles   map[string][]byte
	HeaderFiles map[string][]byte
	Lang        string
}

type CompileResponse added in v0.25.0

type CompileResponse struct {
	Output  string
	Success bool
	Other   string

	Stats *eval.RunStats
}

func CompileTask added in v0.25.0

func CompileTask(ctx context.Context, mgr eval.BoxScheduler, req *CompileRequest, logger *slog.Logger) (*CompileResponse, error)

type ExecRequest added in v0.25.0

type ExecRequest struct {
	SubID     int
	SubtestID int
	Filename  string

	// TimeLimit is in seconds, MemoryLimit is in kilobytes
	MemoryLimit int
	TimeLimit   float64

	Lang   string
	TestID int
}

type ExecResponse added in v0.25.0

type ExecResponse struct {
	Time       float64
	Memory     int
	ExitStatus int
	Comments   string
}

func ExecuteTask added in v0.25.0

func ExecuteTask(ctx context.Context, mgr eval.BoxScheduler, memQuota int64, req *ExecRequest, logger *slog.Logger) (*ExecResponse, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL