gitee.com/sasukebo/go-micro/v4@v4.7.1/cmd/protoc-gen-micro/examples/greeter/greeter.proto (about)

     1  syntax = "proto3";
     2  
     3  option go_package = "../greeter";
     4  
     5  import "google/api/annotations.proto";
     6  
     7  service Greeter {
     8  	rpc Hello(Request) returns (Response) {
     9  		option (google.api.http) = { post: "/hello"; body: "*"; };
    10  	}
    11  	rpc Stream(stream Request) returns (stream Response) {
    12  		option (google.api.http) = { get: "/stream"; };
    13  	}
    14  }
    15  
    16  message Request {
    17  	string name = 1;
    18  	optional string msg = 2;
    19  }
    20  
    21  message Response {
    22  	string msg = 1;
    23  }