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