chaos
This commit is contained in:
1
ws/cmd
Normal file
1
ws/cmd
Normal file
@@ -0,0 +1 @@
|
||||
protoc -I/usr/local/include -I. -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --go_out=plugins=grpc:. --grpc-gateway_out=logtostderr=true:. echoserver/echoserver.proto
|
||||
24
ws/ws.proto
Normal file
24
ws/ws.proto
Normal file
@@ -0,0 +1,24 @@
|
||||
syntax = "proto3";
|
||||
package echoserver;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
message WSRequest {
|
||||
string msgType = 1;
|
||||
string userId = 2;
|
||||
string msg = 3;
|
||||
}
|
||||
|
||||
message WSResponse {
|
||||
string msgType = 1;
|
||||
string userId = 2;
|
||||
string msg = 3;
|
||||
}
|
||||
|
||||
service WebSocketService {
|
||||
rpc Test(stream WSRequest) returns (stream WSResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/ws"
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user