proto


helloworld.proto

syntax = "proto3";
import "google/protobuf/empty.proto";
option go_package = ".;proto";

service HelloWrold{
  rpc SayHello(HelloRequest) returns (google.protobuf.Empty);
}

message HelloRequest{
    string content = 1;
    string name = 2;
}
# grpcio
python -m grpc_tools.protoc --python_out=. --grpc_python_out=. -I. helloworld.proto
# grpc-go
protoc -I . helloworld.proto --go_out=plugins=grpc:.


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM