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
|
2024-10-02 03:18:36 +00:00
|
|
|
warden.StartPool()
|
2024-01-24 16:09:39 +00:00
|
|
|
}
|