mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-21 14:23:34 +00:00
Add proxy to faasd up
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
52baca9d17
commit
ff0cccf0dc
@ -65,6 +65,7 @@ func runUp(_ *cobra.Command, _ []string) error {
|
||||
log.Printf("Supervisor init done in: %s\n", time.Since(start).String())
|
||||
|
||||
shutdownTimeout := time.Second * 1
|
||||
timeout := time.Second * 60
|
||||
|
||||
wg := sync.WaitGroup{}
|
||||
wg.Add(1)
|
||||
@ -85,6 +86,12 @@ func runUp(_ *cobra.Command, _ []string) error {
|
||||
})
|
||||
}()
|
||||
|
||||
go func() {
|
||||
wd, _ := os.Getwd()
|
||||
proxy := pkg.NewProxy(path.Join(wd, "hosts"), timeout)
|
||||
proxy.Start()
|
||||
}()
|
||||
|
||||
wg.Wait()
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user