2024-01-24 16:09:39 +00:00
|
|
|
package navi
|
|
|
|
|
|
|
|
import "code.smartsheep.studio/goatworks/roadsign/pkg/warden"
|
|
|
|
|
|
|
|
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-01-24 16:09:39 +00:00
|
|
|
for _, instance := range warden.InstancePool {
|
|
|
|
instance.Wake()
|
|
|
|
}
|
|
|
|
}
|