- meta.proto
- helloworld.proto
protoc --go_out=plugins=grpc:./go/helloworld ./helloworld.proto
protoc --go_out=plugins=grpc:./go/meta ./meta.proto
protoc --proto_path=./ --php_out=phpClient/meta --grpc_out=phpClient/meta --plugin=protoc-gen-grpc=./grpc_php_plugin meta.proto
main.go
运行 go run main.go
phpClient/client.php
执行 php phpClient/client.php
调用rpc服务
显示结果
{"appId":"123","title":"my title","name":"My Name","logo":"https://xxx.com"} the greet: Hello world--from go server