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