JOJ3/cmd/joj3/conf.go

61 lines
1.0 KiB
Go

package main
import "focs.ji.sjtu.edu.cn/git/FOCS-dev/JOJ3/internal/stage"
type Conf struct {
LogLevel int
OutputPath string
Stages []struct {
Name string
Executor struct {
Name string
With struct {
Default stage.Cmd
Cases []OptionalCmd
}
}
Parser struct {
Name string
With interface{}
}
}
}
func DefaultConf() Conf {
return Conf{
LogLevel: 0,
OutputPath: "joj3_result.json",
}
}
type OptionalCmd struct {
Args *[]string
Env *[]string
Stdin *stage.CmdFile
Stdout *stage.CmdFile
Stderr *stage.CmdFile
CPULimit *uint64
RealCPULimit *uint64
ClockLimit *uint64
MemoryLimit *uint64
StackLimit *uint64
ProcLimit *uint64
CPURateLimit *uint64
CPUSetLimit *string
CopyIn *map[string]stage.CmdFile
CopyInCached *map[string]string
CopyInCwd *bool
CopyOut *[]string
CopyOutCached *[]string
CopyOutMax *uint64
CopyOutDir *string
TTY *bool
StrictMemoryLimit *bool
DataSegmentLimit *bool
AddressSpaceLimit *bool
}