Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatExecutionCommand ¶
FormatExecutionCommand 格式化执行命令
Types ¶
type Executor ¶
type Executor interface { // Compile 编译代码 Compile(ctx context.Context, code string, workDir string) (*models.CompileResult, error) // Run 运行代码 Run(ctx context.Context, input string, workDir string, timeLimit, memoryLimit int) (*models.RunResult, error) }
Executor 代码执行器接口
func GetLanguageExecutor ¶
GetLanguageExecutor 获取特定语言的执行器
func NewExecutor ¶
func NewExecutor(language models.Language, langConfig config.LangSpecificConfig, securityConfig config.SecurityConfig) Executor
NewExecutor 创建语言执行器
type LanguageExecutor ¶
type LanguageExecutor struct {
// contains filtered or unexported fields
}
LanguageExecutor 针对特定语言的执行器
func (*LanguageExecutor) Compile ¶
func (e *LanguageExecutor) Compile(ctx context.Context, code string, workDir string) (*models.CompileResult, error)
Compile 编译代码
Click to show internal directories.
Click to hide internal directories.