RoadSign/pkg/navi/warden.go
2024-01-31 13:46:12 +08:00

23 lines
445 B
Go

package navi
import "code.smartsheep.studio/goatworks/roadsign/pkg/warden"
func InitializeWarden(regions []*Region) {
pool := make([]*warden.AppInstance, 0)
for _, region := range regions {
for _, application := range region.Applications {
pool = append(pool, &warden.AppInstance{
Manifest: application,
})
}
}
// Hot swap
warden.InstancePool = pool
for _, instance := range warden.InstancePool {
instance.Wake()
}
}