Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 644 Bytes

readme.md

File metadata and controls

32 lines (25 loc) · 644 Bytes

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