mirror of
https://github.com/dreamstarsky/runbin.git
synced 2026-05-15 22:33:09 +00:00
Merge branch 'dev'
This commit is contained in:
@@ -13,10 +13,11 @@ type LimitConfig struct {
|
||||
}
|
||||
|
||||
type WorkerConfig struct {
|
||||
Storage StorageConfig
|
||||
Limit LimitConfig
|
||||
Process int
|
||||
Name string
|
||||
Storage StorageConfig
|
||||
Limit LimitConfig
|
||||
Process int
|
||||
Name string
|
||||
CompilerImage string
|
||||
}
|
||||
|
||||
func LoadWorker(configFile string) *WorkerConfig {
|
||||
@@ -29,6 +30,7 @@ func LoadWorker(configFile string) *WorkerConfig {
|
||||
v.SetDefault("limit.memory", 512*1024)
|
||||
v.SetDefault("process", 1)
|
||||
v.SetDefault("name", "default name")
|
||||
v.SetDefault("compilerimage", "cpp_gcc-latest:latest")
|
||||
|
||||
if err := v.ReadInConfig(); err != nil {
|
||||
log.Fatalf("Failed to read config file: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user