RoadSign/pkg/navi/warden.go

20 lines
389 B
Go
Raw Normal View History

2024-01-24 16:09:39 +00:00
package navi
2024-09-29 15:03:11 +00:00
import "git.solsynth.dev/goatworks/roadsign/pkg/warden"
2024-01-24 16:09:39 +00:00
func InitializeWarden(regions []*Region) {
2024-01-31 05:46:12 +00:00
pool := make([]*warden.AppInstance, 0)
2024-01-24 16:09:39 +00:00
for _, region := range regions {
for _, application := range region.Applications {
2024-01-31 05:46:12 +00:00
pool = append(pool, &warden.AppInstance{
2024-01-24 16:09:39 +00:00
Manifest: application,
})
}
}
2024-01-31 05:46:12 +00:00
// Hot swap
warden.InstancePool = pool
warden.StartPool()
2024-01-24 16:09:39 +00:00
}