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:
2022-10-16 14:54:49 -06:00
parent b44d4352ff
commit bbe9dcaf2a
7 changed files with 255 additions and 213 deletions
+6
View File
@@ -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),
},
}