-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.go
More file actions
36 lines (32 loc) · 998 Bytes
/
main.go
File metadata and controls
36 lines (32 loc) · 998 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
33
34
35
36
package main
import (
"StealthIMGroupUser/config"
"StealthIMGroupUser/gateway"
"StealthIMGroupUser/grpc"
"StealthIMGroupUser/user"
"log"
)
func main() {
cfg := config.ReadConf()
log.Printf("Start server [%v]\n", config.Version)
log.Printf("+ GRPC\n")
log.Printf(" Host: %s\n", cfg.GRPCProxy.Host)
log.Printf(" Port: %d\n", cfg.GRPCProxy.Port)
log.Printf("+ DBGateway\n")
log.Printf(" Host: %s\n", cfg.DBGateway.Host)
log.Printf(" Port: %d\n", cfg.DBGateway.Port)
log.Printf(" ConnNum: %d\n", cfg.DBGateway.ConnNum)
log.Printf("+ User\n")
log.Printf(" Host: %s\n", cfg.User.Host)
log.Printf(" Port: %d\n", cfg.User.Port)
log.Printf(" ConnNum: %d\n", cfg.User.ConnNum)
log.Printf("+ Session\n")
log.Printf(" Host: %s\n", cfg.Session.Host)
log.Printf(" Port: %d\n", cfg.Session.Port)
log.Printf(" ConnNum: %d\n", cfg.Session.ConnNum)
// 启动 DBGateway
go gateway.InitConns()
go user.InitConns()
// 启动 GRPC 服务
grpc.Start(cfg)
}