fullstorydev / fullstorydev/grpcurl
Failed to resolve symbol "api_def.MgrMoment": Symbol not found: api_def.MgrMoment
- Dominant language
- Go
- Stars
- 12.8k
- Forks
- 580
- Avg merge
- 1h 8m
- Merged PRs (30d)
- 5
Description
Err log
```sh
grpcurl -plaintext localhost:8762 list
api_def.MgrMoment
api_def.MgrTool
grpc.health.v1.Health
grpc.reflection.v1.ServerReflection
grpc.reflection.v1alpha.ServerReflection
kk_rbac.KKRBAC
grpcurl -plaintext localhost:8762 describe api_def.MgrTool
api_def.MgrTool is a service:
service MgrTool {
rpc ReportList ( .api_def.ReportList.Input ) returns ( .api_def.ReportList.Output );
}
grpcurl -plaintext localhost:8762 describe api_def.MgrMoment
Failed to resolve symbol "api_def.MgrMoment": Symbol not found: api_def.MgrMoment
caused by: File not found: vendor/gitee.com/cruvie/kk_go_kit/kk_protobuf/extend_method.proto
```
I have two service in one server
```proto
syntax = "proto3";
package api_def;
option go_package = "/api_def";
import "vendor/gitee.com/cruvie/kk_go_kit/kk_protobuf/extend_method.proto";
import "service_hub/ss_mgr/service_tool/api_def/ReportList.proto";
service MgrTool {
//举报列表
rpc ReportList(ReportList.Input) returns (ReportList.Output){
option (kk_protobuf.api_name) = "举报列表";
option (kk_protobuf.interceptor_list) = INTERCEPTOR_TYPE_AUTH;
}
}
```
```proto
syntax = "proto3";
package api_def;
option go_package = "/api_def";
import "vendor/gitee.com/cruvie/kk_go_kit/kk_protobuf/extend_method.proto";
import "service_hub/ss_mgr/service_moment/api_def/MomentList.proto";
service MgrMoment {
// 动态列表
rpc MomentList(MomentList.Input) returns (MomentList.Output){
option (kk_protobuf.api_name) = "动态列表";
option (kk_protobuf.interceptor_list) = INTERCEPTOR_TYPE_AUTH;
}
}
```
```go
type server1 struct {
api_def.UnimplementedMgrMomentServer
}
type server2 struct {
api_def.UnimplementedMgrToolServer
}
func main() {
listener, err := net.Listen("tcp", fmt.Sprintf(":%d", 8762))
if err != nil {
panic(err)
}
grpcServer := grpc.NewServer( )
api_def.RegisterMgrMomentServer(grpcServer, &server1{})
api_def.RegisterMgrToolServer(grpcServer, &server2{})
reflection.Register(grpcServer)
grpcServer.Serve(listener)
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.