update 【gRPC API】 proto files
This commit is contained in:
@@ -26,6 +26,13 @@ service BroadcastTunnel {
|
||||
rpc CreateTunnel(stream BroadcastFrame) returns (stream BroadcastFrame);
|
||||
}
|
||||
|
||||
//
|
||||
enum Action {
|
||||
UNKNOWN = 0; //
|
||||
UPDATE = 1; //
|
||||
DELETE = 2; //
|
||||
}
|
||||
|
||||
// 鉴权请求,通过authorization验证绑定用户mid
|
||||
message AuthReq {
|
||||
// 冷启动id,算法uuid,重新起启会变
|
||||
@@ -35,28 +42,21 @@ message AuthReq {
|
||||
// 最后收到的消息id,用于过虑重连后获取未读的消息
|
||||
int64 last_msg_id = 3;
|
||||
}
|
||||
|
||||
// 鉴权返回
|
||||
message AuthResp {}
|
||||
message AuthResp {
|
||||
|
||||
// 心跳请求
|
||||
message HeartbeatReq{}
|
||||
// 心跳返回
|
||||
message HeartbeatResp{}
|
||||
|
||||
// target_path
|
||||
message TargetPath {
|
||||
// 需要订阅的target_paths
|
||||
repeated string target_paths = 1;
|
||||
}
|
||||
|
||||
// 消息回执
|
||||
message MessageAckReq {
|
||||
// 消息id
|
||||
int64 ack_id = 1;
|
||||
// ack来源,由业务指定用于埋点跟踪
|
||||
string ack_origin = 2;
|
||||
// 消息对应的target_path,方便业务区分和监控统计
|
||||
string target_path = 3;
|
||||
// target_path:
|
||||
// "/" Service-Name "/" {method name} 参考 gRPC Request Path
|
||||
message BroadcastFrame {
|
||||
// 请求消息信息
|
||||
FrameOption options = 1;
|
||||
// 业务target_path
|
||||
string target_path = 2;
|
||||
// 业务pb内容
|
||||
google.protobuf.Any body = 3;
|
||||
}
|
||||
|
||||
// message_id:
|
||||
@@ -79,18 +79,33 @@ message FrameOption {
|
||||
// 业务状态码
|
||||
bilibili.rpc.Status status = 4;
|
||||
// 业务ack来源, 仅downstream时候由服务端填写.
|
||||
string ack_origin = 5;
|
||||
string ack_origin = 5;
|
||||
//
|
||||
int64 timestamp = 6;
|
||||
}
|
||||
|
||||
// target_path:
|
||||
// "/" Service-Name "/" {method name} 参考 gRPC Request Path
|
||||
message BroadcastFrame {
|
||||
// 请求消息信息
|
||||
FrameOption options = 1;
|
||||
// 业务target_path
|
||||
string target_path = 2;
|
||||
// 业务pb内容
|
||||
google.protobuf.Any body = 3;
|
||||
// 心跳请求
|
||||
message HeartbeatReq{
|
||||
|
||||
}
|
||||
|
||||
// 心跳返回
|
||||
message HeartbeatResp{
|
||||
|
||||
}
|
||||
|
||||
// 消息回执
|
||||
message MessageAckReq {
|
||||
// 消息id
|
||||
int64 ack_id = 1;
|
||||
// ack来源,由业务指定用于埋点跟踪
|
||||
string ack_origin = 2;
|
||||
// 消息对应的target_path,方便业务区分和监控统计
|
||||
string target_path = 3;
|
||||
}
|
||||
|
||||
// target_path
|
||||
message TargetPath {
|
||||
// 需要订阅的target_paths
|
||||
repeated string target_paths = 1;
|
||||
}
|
||||
|
||||
@@ -4,10 +4,24 @@ package bilibili.broadcast.v1;
|
||||
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
message ModResourceResp {}
|
||||
|
||||
// ModManager
|
||||
service ModManager {
|
||||
//
|
||||
rpc WatchResource(google.protobuf.Empty) returns (stream ModResourceResp);
|
||||
}
|
||||
|
||||
//
|
||||
message ModResourceResp {
|
||||
//
|
||||
int32 atcion = 1;
|
||||
//
|
||||
string app_key = 2;
|
||||
//
|
||||
string pool_name = 3;
|
||||
//
|
||||
string module_name = 4;
|
||||
//
|
||||
int64 module_version = 5;
|
||||
//
|
||||
int64 list_version = 6;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,26 @@ service Push {
|
||||
rpc WatchMessage(google.protobuf.Empty) returns (stream PushMessageResp);
|
||||
}
|
||||
|
||||
//
|
||||
enum LinkType {
|
||||
LINK_TYPE_UNKNOWN = 0; // 未知
|
||||
LINK_TYPE_BANGUMI = 1; // 番剧
|
||||
LINK_TYPE_VIDEO = 2; // 视频
|
||||
LINK_TYPE_LIVE = 3; // 直播
|
||||
}
|
||||
|
||||
//
|
||||
message PageBlackList {
|
||||
//
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
//
|
||||
message PageView {
|
||||
//
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
//
|
||||
message PushMessageResp {
|
||||
// 业务类型
|
||||
@@ -78,30 +98,14 @@ message PushMessageResp {
|
||||
repeated PageView page_view = 13;
|
||||
// 跳转资源
|
||||
TargetResource target_resource = 14;
|
||||
}
|
||||
|
||||
//
|
||||
message PageBlackList {
|
||||
//
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
//
|
||||
message PageView {
|
||||
int32 image_frame = 15;
|
||||
//
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
//
|
||||
enum LinkType {
|
||||
// 未知
|
||||
LINK_TYPE_UNKNOWN = 0;
|
||||
// 番剧
|
||||
LINK_TYPE_BANGUMI = 1;
|
||||
// 视频
|
||||
LINK_TYPE_VIDEO = 2;
|
||||
// 直播
|
||||
LINK_TYPE_LIVE = 3;
|
||||
int32 image_marker = 16;
|
||||
//
|
||||
int32 image_position = 17;
|
||||
//
|
||||
int64 job = 18;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -12,15 +12,19 @@ service BroadcastRoom {
|
||||
}
|
||||
|
||||
//
|
||||
message RoomJoinEvent {}
|
||||
|
||||
//
|
||||
message RoomLeaveEvent {}
|
||||
|
||||
//
|
||||
message RoomOnlineEvent {
|
||||
message RoomErrorEvent {
|
||||
//
|
||||
int32 online = 1;
|
||||
bilibili.rpc.Status status = 1;
|
||||
}
|
||||
|
||||
//
|
||||
message RoomJoinEvent {
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
message RoomLeaveEvent {
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
@@ -32,9 +36,11 @@ message RoomMessageEvent {
|
||||
}
|
||||
|
||||
//
|
||||
message RoomErrorEvent {
|
||||
message RoomOnlineEvent {
|
||||
//
|
||||
bilibili.rpc.Status status = 1;
|
||||
int32 online = 1;
|
||||
//
|
||||
int32 all_online = 2;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -14,13 +14,33 @@ service Test {
|
||||
rpc WatchTestEvent(google.protobuf.Empty) returns (stream TestResp);
|
||||
}
|
||||
|
||||
//
|
||||
service Test2 {
|
||||
//
|
||||
rpc Test(AddParams) returns (google.protobuf.Empty);
|
||||
}
|
||||
|
||||
//
|
||||
message AddParams {
|
||||
//
|
||||
int32 a = 1;
|
||||
//
|
||||
int32 b = 2;
|
||||
}
|
||||
|
||||
//
|
||||
message AddResult {
|
||||
//
|
||||
int32 r = 1;
|
||||
}
|
||||
|
||||
message TestResp {
|
||||
// 任务id
|
||||
int64 taskid = 1 [json_name="taskid"];
|
||||
int64 taskid = 1;
|
||||
// 时间戳
|
||||
int64 timestamp = 2 [json_name="timestamp"];
|
||||
int64 timestamp = 2;
|
||||
// 消息
|
||||
string message = 3 [json_name="message"];
|
||||
string message = 3;
|
||||
// 扩展
|
||||
google.protobuf.Any extra = 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user