This repository has been archived on 2024-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
2021-05-02 11:47:08 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
"os"
|
2021-05-02 12:43:10 +00:00
|
|
|
"os/signal"
|
|
|
|
"syscall"
|
2021-05-02 20:49:51 +00:00
|
|
|
|
|
|
|
"github.com/nemunaire/minifaas/config"
|
2021-05-02 11:47:08 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2021-05-02 20:49:51 +00:00
|
|
|
cfg, err := config.Consolidated()
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal("Unable to read configuration:", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
a := NewApp(cfg)
|
2021-05-02 12:43:10 +00:00
|
|
|
go a.Start()
|
2021-05-02 11:47:08 +00:00
|
|
|
|
2021-07-31 15:16:38 +00:00
|
|
|
go runQueue()
|
|
|
|
|
2021-05-02 12:43:10 +00:00
|
|
|
quit := make(chan os.Signal)
|
|
|
|
signal.Notify(quit, os.Interrupt, syscall.SIGTERM)
|
|
|
|
<-quit
|
|
|
|
log.Println("Stopping the service...")
|
|
|
|
a.Stop()
|
|
|
|
log.Println("Stopped")
|
2021-05-02 11:47:08 +00:00
|
|
|
}
|