syntax = "proto3"; package hello; option go_package="gitlab.com/go-course-project/go17/skills/grpc/service"; message HelloRequest { string my_name = 1; int64 age = 2; repeated int64 magic_number = 3; map extras = 4; } message HelloResponse { string message = 1; } message ChatRequest { uint64 id = 1; string message = 2; } message ChatResponse { uint64 id = 1; bool is_success = 2; string message = 3; } // grpc 接口声明 service HelloService { rpc Hello(HelloRequest) returns(HelloResponse); // 双向流接口 rpc Chat(stream ChatRequest) returns(stream ChatResponse); }