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

proto function not define in yaml then grpc-gateway_out err #1233

Closed
xuchunhua-com opened this issue Apr 22, 2020 · 3 comments
Closed

proto function not define in yaml then grpc-gateway_out err #1233

xuchunhua-com opened this issue Apr 22, 2020 · 3 comments

Comments

@xuchunhua-com
Copy link

xuchunhua-com commented Apr 22, 2020

aggregate.proto
service AggregateService {
rpc InternalFunc (base.Empty) returns (HomeResp);
rpc GetHotKeyword (base.Empty) returns (GetHotKeywordResp);
}

app.yaml
type: google.api.Service
config_version: 3
http:
rules:
- selector: aggregate.AggregateService.GetHotKeyword
post: /goAppApi/aggregate/getHotKeyword
body: "*"

protoc -I/usr/local/include -Iproto --grpc-gateway_out=logtostderr=true,paths=source_relative,grpc_api_configuration=./proto/app.yaml:gen/gw/app/ ./proto/aggregate/aggregate.proto

--grpc-gateway_out: HTTP rules without a matching selector: AggregateService .InternalFunc

@xuchunhua-com xuchunhua-com changed the title proto function not defin in yaml then grpc-gateway_out err proto function not define in yaml then grpc-gateway_out err Apr 22, 2020
@johanbrandhorst
Copy link
Collaborator

Does your proto file have a package? This is an error when you try to map to a function that is not found.

Try:

syntax="proto3";

package aggregate;

service AggregateService {
rpc InternalFunc (base.Empty) returns (HomeResp);
rpc GetHotKeyword (base.Empty) returns (GetHotKeywordResp);
}

@johanbrandhorst
Copy link
Collaborator

See #1178 for more information

@xuchunhua-com
Copy link
Author

See #1178 for more information

thanks
i use old version, it's work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants