DengBiao pirms 1 gada
vecāks
revīzija
9b421e6769
1 mainītis faili ar 9 papildinājumiem un 1 dzēšanām
  1. +9
    -1
      cmd/business/main.go

+ 9
- 1
cmd/business/main.go Parādīt failu

@@ -9,8 +9,11 @@ import (
"gim/pkg/pb"
"gim/pkg/urlwhitelist"
"net"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
"runtime"
"syscall"

"go.uber.org/zap"
@@ -18,7 +21,7 @@ import (
)

func main() {
config.Init()
//config.Init()
db.Init()

server := grpc.NewServer(grpc.UnaryInterceptor(interceptor.NewInterceptor("business_interceptor", urlwhitelist.Business)))
@@ -31,6 +34,11 @@ func main() {
server.GracefulStop()
}()

runtime.SetBlockProfileRate(1)
go func() {
http.ListenAndServe(":10001", nil)
}()

pb.RegisterBusinessIntServer(server, &api.BusinessIntServer{})
pb.RegisterBusinessExtServer(server, &api.BusinessExtServer{})
listen, err := net.Listen("tcp", config.RPCListenAddr)


Notiek ielāde…
Atcelt
Saglabāt