Skip to content

qietv/qgrpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gRPC 封装

目标

使用方法

go get github.com/qietv/qgrpc/pkg

    s, err := qgrpc.New(&qgrpc.Config{
        Name:              "qietv",
        Network:           "tcp",
        Addr:              ":8808",
        AccessLog:         "access.log",
        ErrorLog:          "error.log",
        Interceptor:       nil,
    }, func(s *grpc.Server) {
        user.RegisterGRPCBanServer(s, &banServer{})
    })
    if err != nil {
        panic("grpc server start fail")
    }
    defer s.Server.GracefulStop()

里程碑

  • 健康检查
  • metrics
  • discovery
  • access && error log