58 lines
1.3 KiB
Protocol Buffer
58 lines
1.3 KiB
Protocol Buffer
// +bili:type=service
|
|
// Code generated by warden.
|
|
syntax = "proto3";
|
|
|
|
package push.interface.broadcast;
|
|
option go_package = "v1";
|
|
|
|
import "app/service/main/broadcast/model/model.proto";
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
|
|
message Empty{}
|
|
|
|
message PushMsgReq {
|
|
repeated string keys = 1;
|
|
int32 protoOp = 3;
|
|
push.service.broadcast.model.Proto proto = 2;
|
|
}
|
|
|
|
message PushMsgReply {}
|
|
|
|
message BroadcastReq{
|
|
int32 protoOp = 1;
|
|
push.service.broadcast.model.Proto proto = 2;
|
|
int32 speed = 3;
|
|
string platform = 4;
|
|
}
|
|
|
|
message BroadcastReply{}
|
|
|
|
message BroadcastRoomReq {
|
|
string roomID = 1;
|
|
push.service.broadcast.model.Proto proto = 2;
|
|
}
|
|
|
|
message BroadcastRoomReply{}
|
|
|
|
message RoomsReq{}
|
|
|
|
message RoomsReply {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
map<string,bool> rooms = 1;
|
|
}
|
|
|
|
service Zerg {
|
|
// Ping Service
|
|
rpc Ping(Empty) returns(Empty);
|
|
// Close Service
|
|
rpc Close(Empty) returns(Empty);
|
|
//PushMsg push by key or mid
|
|
rpc PushMsg(PushMsgReq) returns (PushMsgReply);
|
|
// Broadcast send to every enrity
|
|
rpc Broadcast(BroadcastReq) returns (BroadcastReply);
|
|
// BroadcastRoom broadcast to one room
|
|
rpc BroadcastRoom(BroadcastRoomReq) returns (BroadcastRoomReply);
|
|
// Rooms get all rooms
|
|
rpc Rooms(RoomsReq) returns (RoomsReply);
|
|
}
|