Documentation ¶
Index ¶
- Constants
- Variables
- func CallbackAllError(status string, sid uint32, isContest bool, datasetCount int)
- func CallbackSuccess(sid uint32, isContest bool, resultList []*protobuf.JudgeCaseResult)
- func Compiler(sid uint32, codePath string, code []byte, ...) ([]byte, error)
- func InitJudger(ctx context.Context, config *JudgerModels.JudgerConfigType, ...)
- func JudgeOneCase(testResult *JudgerModels.TestResult, stdout, rightStdout, compMode string) *JudgerModels.JudgeResult
- func JudgeRequestBridge(body []byte)
- func JudgeRequestHandler()
- func JudgeResponseBridge(body []byte)
- func JudgeResultHandler()
- func Language()
- func MQ(ctx context.Context)
- func Requeue(topic string, body []byte)
- func Runner(sid uint32, codePath string, compileInfo *JudgerModels.CompileInfo, ...) (map[string][]byte, error)
- func Scheduler(request *protobuf.JudgeRequest) (string, []*protobuf.JudgeCaseResult, error)
- func StartMachine(ctx context.Context, index uint, queueChan chan []byte)
- func Starter(info *StarterType) error
- type CollectedStdout
- type JudgeResponseCallback
- type StarterType
- type StorageGetFuncType
Constants ¶
View Source
const (
StatusOK = "OK"
)
Variables ¶
View Source
var ( CallbackWaitGroup sync.WaitGroup OnJudgeResponse []JudgeResponseCallback )
View Source
var ( MachineContext context.Context MachineContextCancelFunc context.CancelFunc )
View Source
var (
MachineWaitGroup sync.WaitGroup
)
Functions ¶
func CallbackAllError ¶
func CallbackSuccess ¶
func CallbackSuccess(sid uint32, isContest bool, resultList []*protobuf.JudgeCaseResult)
func Compiler ¶
func Compiler(sid uint32, codePath string, code []byte, compileInfo *JudgerModels.CompileInfo) ([]byte, error)
func InitJudger ¶
func InitJudger(ctx context.Context, config *JudgerModels.JudgerConfigType, storageGetFunc StorageGetFuncType, withDocker bool, withKafka bool, role string)
func JudgeOneCase ¶
func JudgeOneCase(testResult *JudgerModels.TestResult, stdout, rightStdout, compMode string) *JudgerModels.JudgeResult
func JudgeRequestBridge ¶
func JudgeRequestBridge(body []byte)
func JudgeRequestHandler ¶
func JudgeRequestHandler()
func JudgeResponseBridge ¶
func JudgeResponseBridge(body []byte)
func JudgeResultHandler ¶
func JudgeResultHandler()
func Runner ¶
func Runner( sid uint32, codePath string, compileInfo *JudgerModels.CompileInfo, testCases []*JudgerModels.TestCaseType, timeLimit, spaceLimit, outputPath string, code []byte, buildProduction []byte, ) (map[string][]byte, error)
func Scheduler ¶
func Scheduler(request *protobuf.JudgeRequest) (string, []*protobuf.JudgeCaseResult, error)
func Starter ¶
func Starter(info *StarterType) error
Types ¶
type CollectedStdout ¶
type JudgeResponseCallback ¶
type JudgeResponseCallback = func(sid uint32, isContest bool, judgeResult []*JudgerModels.JudgeResult)
type StarterType ¶
type StorageGetFuncType ¶
type StorageGetFuncType = func(tid uint32, version string) ([]*JudgerModels.TestCaseType, error)
var (
StorageGetFunc StorageGetFuncType
)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.