executorlib

package
v0.0.0-...-626f07b Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: Apache-2.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 CPPExecutor

type CPPExecutor struct {
	WorkDir     string
	Code        string
	Stdin       string
	TimeLimit   int64
	MemoryLimit int64
	// contains filtered or unexported fields
}

func (*CPPExecutor) Clean

func (ex *CPPExecutor) Clean(ctx context.Context) error

func (*CPPExecutor) Compile

func (ex *CPPExecutor) Compile(ctx context.Context) (*ExecutionResult, error)

func (*CPPExecutor) Run

func (ex *CPPExecutor) Run(ctx context.Context) (*ExecutionResult, error)

type ExecutionResult

type ExecutionResult struct {
	Stdout              string
	Stderr              string
	IsTimeLimitExceeded bool
	IsCompileError      bool
	Error               string
}

type ExecutorItf

type ExecutorItf interface {
	Compile(ctx context.Context) (*ExecutionResult, error)
	Run(ctx context.Context) (*ExecutionResult, error)
	Clean(ctx context.Context) error
}

func New

func New(param NewExecutorParam) (ExecutorItf, error)

type NewExecutorParam

type NewExecutorParam struct {
	ExecutorType int
	WorkDir      string
	Code         string
	Stdin        string
	TimeLimit    int64
	MemoryLimit  int64
}

Jump to

Keyboard shortcuts

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