WIP: Replace job execution with runner delegation
Server now accepts runner connections via websockets. Jobs will be delegated to these runners. This is currently a WIP, as it is still hardcoded to use the first available runner.
This commit is contained in:
@@ -16,10 +16,15 @@ type Job struct {
|
||||
Cron *string
|
||||
}
|
||||
|
||||
type Runner struct {
|
||||
Secret string
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Address string
|
||||
Port int
|
||||
Jobs map[string]Job
|
||||
Runners map[string]Runner
|
||||
}
|
||||
|
||||
func GetConfig() (config.Config[Config], error) {
|
||||
@@ -30,6 +35,7 @@ func GetConfig() (config.Config[Config], error) {
|
||||
Address: "127.0.0.1",
|
||||
Port: 45420,
|
||||
Jobs: make(map[string]Job),
|
||||
Runners: make(map[string]Runner),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user