Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]grpc的proto文件里 package 不能包含grpc #2702

Open
daorren opened this issue Feb 2, 2023 · 0 comments
Open

[BUG]grpc的proto文件里 package 不能包含grpc #2702

daorren opened this issue Feb 2, 2023 · 0 comments
Labels
type: bug for issue something isn't working

Comments

@daorren
Copy link

daorren commented Feb 2, 2023

  • Node Version:v16.15.0
  • Midway Version(Decorator/Core):
  • Component Name/Version:
  • Platform:
  • Mini Showcase Repository:

复现步骤

  1. 使用GRPC Health Checking Protocol提到的proto文件
syntax = "proto3";

package grpc.health.v1;

message HealthCheckRequest {
  string service = 1;
}

message HealthCheckResponse {
  enum ServingStatus {
    UNKNOWN = 0;
    SERVING = 1;
    NOT_SERVING = 2;
    SERVICE_UNKNOWN = 3;  // Used only by the Watch method.
  }
  ServingStatus status = 1;
}

service Health {
  rpc Check(HealthCheckRequest) returns (HealthCheckResponse);

  rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse);
}
  1. 执行npm run generate
  2. 产生的ts文件中,namespace grpcimport * as grpc from '@midwayjs/grpc'; 重复使用grpc声明
@czy88840616 czy88840616 added the type: bug for issue something isn't working label Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug for issue something isn't working
Development

No branches or pull requests

2 participants