✨ Hot reload
This commit is contained in:
@ -49,6 +49,7 @@ func ReadInConfig(root string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Hot swap
|
||||
R = instance
|
||||
|
||||
return nil
|
||||
|
@ -3,14 +3,19 @@ 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 {
|
||||
warden.InstancePool = append(warden.InstancePool, &warden.AppInstance{
|
||||
pool = append(pool, &warden.AppInstance{
|
||||
Manifest: application,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Hot swap
|
||||
warden.InstancePool = pool
|
||||
|
||||
for _, instance := range warden.InstancePool {
|
||||
instance.Wake()
|
||||
}
|
||||
|
Reference in New Issue
Block a user