OSGOS_D1/custom/shop-client/main.go

37 lines
760 B
Go
Raw Normal View History

2024-01-30 07:10:17 +00:00
// OSGOS shop client
// =======================================================================================================
// Author: LLC Texnico <main@texnico.ru>
// All rights reserved
// Russia, Chelyabinsk, 2022-2024
package main
import (
log "github.com/sirupsen/logrus"
"os"
"os/signal"
"shop-client/services"
"shop-client/services/web"
"syscall"
)
func main() {
interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt, syscall.SIGTERM)
go web.Thread()
go services.HelperService()
switch <-interrupt {
case os.Interrupt:
log.Info("got SIGINT...")
case os.Kill:
log.Info("got SIGKILL...")
case syscall.SIGTERM:
log.Info("got SIGTERM...")
}
services.Stop()
log.Info("закончили работу")
}