-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
32 lines (28 loc) · 801 Bytes
/
main.go
File metadata and controls
32 lines (28 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"go.uber.org/zap"
"github.com/ZeroTechh/UserMainService/handler"
"github.com/ZeroTechh/VelocityCore/logger"
proto "github.com/ZeroTechh/VelocityCore/proto/UserMainService"
"github.com/ZeroTechh/VelocityCore/services"
"github.com/ZeroTechh/VelocityCore/utils"
"github.com/ZeroTechh/hades"
)
var (
config = hades.GetConfig("main.yaml", []string{"config"})
log = logger.GetLogger(
config.Map("service").Str("logFile"),
config.Map("service").Bool("debug"),
)
)
func main() {
defer utils.HandlePanic(log)
grpcServer, listner := utils.CreateGRPCServer(
services.UserMainService,
log,
)
proto.RegisterUserMainServer(grpcServer, handler.New())
if err := grpcServer.Serve(*listner); err != nil {
log.Fatal("Service Failed With Error", zap.Error(err))
}
}