diff --git a/api.go b/api.go index 3f74ffa..1f9a69a 100644 --- a/api.go +++ b/api.go @@ -4,6 +4,8 @@ import ( "context" "encoding/json" "errors" + "fmt" + "maps" "net" "net/http" "runtime" @@ -141,6 +143,27 @@ func (s *Server) StreamInfo(ctx context.Context, req *pb.StreamSnapRequest) (res }) return } + +func (s *Server) TaskTree(context.Context, *emptypb.Empty) (res *pb.TaskTreeResponse, err error) { + res = &pb.TaskTreeResponse{} + var fillData func(m *util.MarcoTask, res *pb.TaskTreeResponse) + fillData = func(m *util.MarcoTask, res *pb.TaskTreeResponse) { + for task, marcoTask := range m.Range { + child := &pb.TaskTreeResponse{Id: task.ID, Type: task.GetTaskType(), Owner: task.GetOwnerType(), StartTime: timestamppb.New(task.StartTime), Description: maps.Collect(func(yield func(key, value string) bool) { + for k, v := range task.Description { + yield(k, fmt.Sprintf("%v", v)) + } + })} + if marcoTask != nil { + fillData(marcoTask, child) + } + res.Children = append(res.Children, child) + } + } + fillData(&s.MarcoTask, res) + return +} + func (s *Server) GetSubscribers(ctx context.Context, req *pb.SubscribersRequest) (res *pb.SubscribersResponse, err error) { s.streamTask.Call(func() error { var subscribers []*pb.SubscriberSnapShot diff --git a/pb/global.pb.go b/pb/global.pb.go index 3bcd8b9..6e5d654 100644 --- a/pb/global.pb.go +++ b/pb/global.pb.go @@ -742,6 +742,93 @@ func (x *SysInfoResponse) GetPlugins() []*PluginInfo { return nil } +type TaskTreeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=startTime,proto3" json:"startTime,omitempty"` + Description map[string]string `protobuf:"bytes,5,rep,name=description,proto3" json:"description,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Children []*TaskTreeResponse `protobuf:"bytes,6,rep,name=children,proto3" json:"children,omitempty"` +} + +func (x *TaskTreeResponse) Reset() { + *x = TaskTreeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_global_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskTreeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskTreeResponse) ProtoMessage() {} + +func (x *TaskTreeResponse) ProtoReflect() protoreflect.Message { + mi := &file_global_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskTreeResponse.ProtoReflect.Descriptor instead. +func (*TaskTreeResponse) Descriptor() ([]byte, []int) { + return file_global_proto_rawDescGZIP(), []int{10} +} + +func (x *TaskTreeResponse) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *TaskTreeResponse) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *TaskTreeResponse) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *TaskTreeResponse) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *TaskTreeResponse) GetDescription() map[string]string { + if x != nil { + return x.Description + } + return nil +} + +func (x *TaskTreeResponse) GetChildren() []*TaskTreeResponse { + if x != nil { + return x.Children + } + return nil +} + type StreamListRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -754,7 +841,7 @@ type StreamListRequest struct { func (x *StreamListRequest) Reset() { *x = StreamListRequest{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[10] + mi := &file_global_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -767,7 +854,7 @@ func (x *StreamListRequest) String() string { func (*StreamListRequest) ProtoMessage() {} func (x *StreamListRequest) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[10] + mi := &file_global_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -780,7 +867,7 @@ func (x *StreamListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamListRequest.ProtoReflect.Descriptor instead. func (*StreamListRequest) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{10} + return file_global_proto_rawDescGZIP(), []int{11} } func (x *StreamListRequest) GetPageNum() int32 { @@ -811,7 +898,7 @@ type StreamListResponse struct { func (x *StreamListResponse) Reset() { *x = StreamListResponse{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[11] + mi := &file_global_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -824,7 +911,7 @@ func (x *StreamListResponse) String() string { func (*StreamListResponse) ProtoMessage() {} func (x *StreamListResponse) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[11] + mi := &file_global_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -837,7 +924,7 @@ func (x *StreamListResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamListResponse.ProtoReflect.Descriptor instead. func (*StreamListResponse) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{11} + return file_global_proto_rawDescGZIP(), []int{12} } func (x *StreamListResponse) GetTotal() int32 { @@ -879,7 +966,7 @@ type StreamWaitListResponse struct { func (x *StreamWaitListResponse) Reset() { *x = StreamWaitListResponse{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[12] + mi := &file_global_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -892,7 +979,7 @@ func (x *StreamWaitListResponse) String() string { func (*StreamWaitListResponse) ProtoMessage() {} func (x *StreamWaitListResponse) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[12] + mi := &file_global_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -905,7 +992,7 @@ func (x *StreamWaitListResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamWaitListResponse.ProtoReflect.Descriptor instead. func (*StreamWaitListResponse) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{12} + return file_global_proto_rawDescGZIP(), []int{13} } func (x *StreamWaitListResponse) GetList() map[string]int32 { @@ -926,7 +1013,7 @@ type StreamSnapRequest struct { func (x *StreamSnapRequest) Reset() { *x = StreamSnapRequest{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[13] + mi := &file_global_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -939,7 +1026,7 @@ func (x *StreamSnapRequest) String() string { func (*StreamSnapRequest) ProtoMessage() {} func (x *StreamSnapRequest) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[13] + mi := &file_global_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -952,7 +1039,7 @@ func (x *StreamSnapRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamSnapRequest.ProtoReflect.Descriptor instead. func (*StreamSnapRequest) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{13} + return file_global_proto_rawDescGZIP(), []int{14} } func (x *StreamSnapRequest) GetStreamPath() string { @@ -980,7 +1067,7 @@ type StreamInfoResponse struct { func (x *StreamInfoResponse) Reset() { *x = StreamInfoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[14] + mi := &file_global_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -993,7 +1080,7 @@ func (x *StreamInfoResponse) String() string { func (*StreamInfoResponse) ProtoMessage() {} func (x *StreamInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[14] + mi := &file_global_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1006,7 +1093,7 @@ func (x *StreamInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamInfoResponse.ProtoReflect.Descriptor instead. func (*StreamInfoResponse) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{14} + return file_global_proto_rawDescGZIP(), []int{15} } func (x *StreamInfoResponse) GetPath() string { @@ -1078,7 +1165,7 @@ type Wrap struct { func (x *Wrap) Reset() { *x = Wrap{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[15] + mi := &file_global_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1091,7 +1178,7 @@ func (x *Wrap) String() string { func (*Wrap) ProtoMessage() {} func (x *Wrap) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[15] + mi := &file_global_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1104,7 +1191,7 @@ func (x *Wrap) ProtoReflect() protoreflect.Message { // Deprecated: Use Wrap.ProtoReflect.Descriptor instead. func (*Wrap) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{15} + return file_global_proto_rawDescGZIP(), []int{16} } func (x *Wrap) GetTimestamp() uint32 { @@ -1143,7 +1230,7 @@ type TrackSnapShot struct { func (x *TrackSnapShot) Reset() { *x = TrackSnapShot{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[16] + mi := &file_global_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1156,7 +1243,7 @@ func (x *TrackSnapShot) String() string { func (*TrackSnapShot) ProtoMessage() {} func (x *TrackSnapShot) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[16] + mi := &file_global_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1169,7 +1256,7 @@ func (x *TrackSnapShot) ProtoReflect() protoreflect.Message { // Deprecated: Use TrackSnapShot.ProtoReflect.Descriptor instead. func (*TrackSnapShot) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{16} + return file_global_proto_rawDescGZIP(), []int{17} } func (x *TrackSnapShot) GetSequence() uint32 { @@ -1219,7 +1306,7 @@ type MemoryBlock struct { func (x *MemoryBlock) Reset() { *x = MemoryBlock{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[17] + mi := &file_global_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1232,7 +1319,7 @@ func (x *MemoryBlock) String() string { func (*MemoryBlock) ProtoMessage() {} func (x *MemoryBlock) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[17] + mi := &file_global_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1245,7 +1332,7 @@ func (x *MemoryBlock) ProtoReflect() protoreflect.Message { // Deprecated: Use MemoryBlock.ProtoReflect.Descriptor instead. func (*MemoryBlock) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{17} + return file_global_proto_rawDescGZIP(), []int{18} } func (x *MemoryBlock) GetS() uint32 { @@ -1274,7 +1361,7 @@ type MemoryBlockGroup struct { func (x *MemoryBlockGroup) Reset() { *x = MemoryBlockGroup{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[18] + mi := &file_global_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1287,7 +1374,7 @@ func (x *MemoryBlockGroup) String() string { func (*MemoryBlockGroup) ProtoMessage() {} func (x *MemoryBlockGroup) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[18] + mi := &file_global_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1300,7 +1387,7 @@ func (x *MemoryBlockGroup) ProtoReflect() protoreflect.Message { // Deprecated: Use MemoryBlockGroup.ProtoReflect.Descriptor instead. func (*MemoryBlockGroup) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{18} + return file_global_proto_rawDescGZIP(), []int{19} } func (x *MemoryBlockGroup) GetSize() uint32 { @@ -1334,7 +1421,7 @@ type AudioTrackInfo struct { func (x *AudioTrackInfo) Reset() { *x = AudioTrackInfo{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[19] + mi := &file_global_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1347,7 +1434,7 @@ func (x *AudioTrackInfo) String() string { func (*AudioTrackInfo) ProtoMessage() {} func (x *AudioTrackInfo) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[19] + mi := &file_global_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1360,7 +1447,7 @@ func (x *AudioTrackInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use AudioTrackInfo.ProtoReflect.Descriptor instead. func (*AudioTrackInfo) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{19} + return file_global_proto_rawDescGZIP(), []int{20} } func (x *AudioTrackInfo) GetCodec() string { @@ -1426,7 +1513,7 @@ type TrackSnapShotResponse struct { func (x *TrackSnapShotResponse) Reset() { *x = TrackSnapShotResponse{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[20] + mi := &file_global_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1439,7 +1526,7 @@ func (x *TrackSnapShotResponse) String() string { func (*TrackSnapShotResponse) ProtoMessage() {} func (x *TrackSnapShotResponse) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[20] + mi := &file_global_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1452,7 +1539,7 @@ func (x *TrackSnapShotResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TrackSnapShotResponse.ProtoReflect.Descriptor instead. func (*TrackSnapShotResponse) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{20} + return file_global_proto_rawDescGZIP(), []int{21} } func (x *TrackSnapShotResponse) GetRing() []*TrackSnapShot { @@ -1501,7 +1588,7 @@ type VideoTrackInfo struct { func (x *VideoTrackInfo) Reset() { *x = VideoTrackInfo{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[21] + mi := &file_global_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1514,7 +1601,7 @@ func (x *VideoTrackInfo) String() string { func (*VideoTrackInfo) ProtoMessage() {} func (x *VideoTrackInfo) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[21] + mi := &file_global_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1527,7 +1614,7 @@ func (x *VideoTrackInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use VideoTrackInfo.ProtoReflect.Descriptor instead. func (*VideoTrackInfo) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{21} + return file_global_proto_rawDescGZIP(), []int{22} } func (x *VideoTrackInfo) GetCodec() string { @@ -1598,7 +1685,7 @@ type SuccessResponse struct { func (x *SuccessResponse) Reset() { *x = SuccessResponse{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[22] + mi := &file_global_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1611,7 +1698,7 @@ func (x *SuccessResponse) String() string { func (*SuccessResponse) ProtoMessage() {} func (x *SuccessResponse) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[22] + mi := &file_global_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1624,7 +1711,7 @@ func (x *SuccessResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SuccessResponse.ProtoReflect.Descriptor instead. func (*SuccessResponse) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{22} + return file_global_proto_rawDescGZIP(), []int{23} } func (x *SuccessResponse) GetCode() int32 { @@ -1652,7 +1739,7 @@ type RequestWithId struct { func (x *RequestWithId) Reset() { *x = RequestWithId{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[23] + mi := &file_global_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1665,7 +1752,7 @@ func (x *RequestWithId) String() string { func (*RequestWithId) ProtoMessage() {} func (x *RequestWithId) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[23] + mi := &file_global_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1678,7 +1765,7 @@ func (x *RequestWithId) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestWithId.ProtoReflect.Descriptor instead. func (*RequestWithId) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{23} + return file_global_proto_rawDescGZIP(), []int{24} } func (x *RequestWithId) GetId() uint32 { @@ -1700,7 +1787,7 @@ type ChangeSubscribeRequest struct { func (x *ChangeSubscribeRequest) Reset() { *x = ChangeSubscribeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[24] + mi := &file_global_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1713,7 +1800,7 @@ func (x *ChangeSubscribeRequest) String() string { func (*ChangeSubscribeRequest) ProtoMessage() {} func (x *ChangeSubscribeRequest) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[24] + mi := &file_global_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1726,7 +1813,7 @@ func (x *ChangeSubscribeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeSubscribeRequest.ProtoReflect.Descriptor instead. func (*ChangeSubscribeRequest) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{24} + return file_global_proto_rawDescGZIP(), []int{25} } func (x *ChangeSubscribeRequest) GetId() uint32 { @@ -1756,7 +1843,7 @@ type SubscribersRequest struct { func (x *SubscribersRequest) Reset() { *x = SubscribersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[25] + mi := &file_global_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1769,7 +1856,7 @@ func (x *SubscribersRequest) String() string { func (*SubscribersRequest) ProtoMessage() {} func (x *SubscribersRequest) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[25] + mi := &file_global_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1782,7 +1869,7 @@ func (x *SubscribersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SubscribersRequest.ProtoReflect.Descriptor instead. func (*SubscribersRequest) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{25} + return file_global_proto_rawDescGZIP(), []int{26} } func (x *SubscribersRequest) GetStreamPath() string { @@ -1820,7 +1907,7 @@ type RingReaderSnapShot struct { func (x *RingReaderSnapShot) Reset() { *x = RingReaderSnapShot{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[26] + mi := &file_global_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1833,7 +1920,7 @@ func (x *RingReaderSnapShot) String() string { func (*RingReaderSnapShot) ProtoMessage() {} func (x *RingReaderSnapShot) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[26] + mi := &file_global_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1846,7 +1933,7 @@ func (x *RingReaderSnapShot) ProtoReflect() protoreflect.Message { // Deprecated: Use RingReaderSnapShot.ProtoReflect.Descriptor instead. func (*RingReaderSnapShot) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{26} + return file_global_proto_rawDescGZIP(), []int{27} } func (x *RingReaderSnapShot) GetSequence() uint32 { @@ -1892,7 +1979,7 @@ type SubscriberSnapShot struct { func (x *SubscriberSnapShot) Reset() { *x = SubscriberSnapShot{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[27] + mi := &file_global_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1905,7 +1992,7 @@ func (x *SubscriberSnapShot) String() string { func (*SubscriberSnapShot) ProtoMessage() {} func (x *SubscriberSnapShot) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[27] + mi := &file_global_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1918,7 +2005,7 @@ func (x *SubscriberSnapShot) ProtoReflect() protoreflect.Message { // Deprecated: Use SubscriberSnapShot.ProtoReflect.Descriptor instead. func (*SubscriberSnapShot) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{27} + return file_global_proto_rawDescGZIP(), []int{28} } func (x *SubscriberSnapShot) GetId() uint32 { @@ -1970,7 +2057,7 @@ type SubscribersResponse struct { func (x *SubscribersResponse) Reset() { *x = SubscribersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_global_proto_msgTypes[28] + mi := &file_global_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1983,7 +2070,7 @@ func (x *SubscribersResponse) String() string { func (*SubscribersResponse) ProtoMessage() {} func (x *SubscribersResponse) ProtoReflect() protoreflect.Message { - mi := &file_global_proto_msgTypes[28] + mi := &file_global_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1996,7 +2083,7 @@ func (x *SubscribersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SubscribersResponse.ProtoReflect.Descriptor instead. func (*SubscribersResponse) Descriptor() ([]byte, []int) { - return file_global_proto_rawDescGZIP(), []int{28} + return file_global_proto_rawDescGZIP(), []int{29} } func (x *SubscribersResponse) GetTotal() int32 { @@ -2142,259 +2229,285 @@ var file_global_proto_rawDesc = []byte{ 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x70, 0x75, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x22, 0x49, 0x0a, 0x11, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, - 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x04, - 0x6c, 0x69, 0x73, 0x74, 0x22, 0x8c, 0x01, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, - 0x61, 0x69, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x39, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x69, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x1a, 0x37, 0x0a, 0x09, 0x4c, 0x69, - 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x33, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x6e, 0x61, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x22, 0xac, 0x02, 0x0a, 0x12, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, 0x12, 0x33, 0x0a, 0x0a, 0x61, - 0x75, 0x64, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, - 0x12, 0x33, 0x0a, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, - 0x54, 0x72, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, - 0x54, 0x72, 0x61, 0x63, 0x6b, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x4c, 0x0a, 0x04, 0x57, 0x72, 0x61, 0x70, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, - 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xbe, 0x01, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, - 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, - 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, - 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x38, 0x0a, 0x09, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, - 0x65, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, - 0x65, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x04, 0x77, 0x72, 0x61, 0x70, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x57, 0x72, 0x61, 0x70, - 0x52, 0x04, 0x77, 0x72, 0x61, 0x70, 0x22, 0x29, 0x0a, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0c, 0x0a, 0x01, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x01, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x01, - 0x65, 0x22, 0x4c, 0x0a, 0x10, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x4d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, - 0xb0, 0x01, 0x0a, 0x0e, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x74, - 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x12, - 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, - 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x03, 0x62, 0x70, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x03, 0x66, 0x70, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x52, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x73, 0x22, 0x8d, 0x02, 0x0a, 0x15, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x6e, 0x61, 0x70, - 0x53, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, - 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x37, 0x73, - 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x52, 0x04, - 0x72, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x69, 0x6e, 0x67, - 0x44, 0x61, 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x54, - 0x72, 0x61, 0x63, 0x6b, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, - 0x72, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x4d, - 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0xb4, 0x01, 0x0a, 0x0e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x64, - 0x65, 0x6c, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x74, - 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x03, 0x62, 0x70, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x70, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x66, 0x70, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, - 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x6f, 0x70, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x6f, 0x70, 0x22, 0x37, 0x0a, 0x0f, 0x53, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, - 0x73, 0x67, 0x22, 0x1f, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, - 0x68, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, - 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x22, 0x6a, 0x0a, - 0x12, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, - 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x7a, 0x0a, 0x12, 0x52, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6c, - 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xe8, 0x01, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x09, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x52, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x37, - 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, - 0x53, 0x68, 0x6f, 0x74, 0x52, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x12, 0x39, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x52, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x52, - 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, - 0x6d, 0x65, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, - 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x18, - 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, - 0x74, 0x32, 0xc7, 0x0b, 0x0a, 0x06, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x12, 0x4d, 0x0a, 0x07, - 0x53, 0x79, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x14, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x07, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, - 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x52, 0x0a, 0x08, 0x53, 0x68, - 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x12, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x12, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x50, - 0x0a, 0x07, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x12, 0x2e, 0x6d, 0x37, 0x73, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x12, 0x57, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, - 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x5d, 0x0a, 0x08, 0x57, 0x61, 0x69, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, - 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x69, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, - 0x77, 0x61, 0x69, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x67, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, - 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, - 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x69, 0x6e, 0x66, - 0x6f, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, - 0x7d, 0x12, 0x6d, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6d, - 0x37, 0x73, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, - 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, 0x7d, - 0x12, 0x72, 0x0a, 0x0e, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x6e, - 0x61, 0x70, 0x12, 0x16, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, - 0x6e, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x37, 0x73, - 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x2f, - 0x73, 0x6e, 0x61, 0x70, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, - 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x72, 0x0a, 0x0e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x72, 0x61, - 0x63, 0x6b, 0x53, 0x6e, 0x61, 0x70, 0x12, 0x16, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x22, 0xc3, 0x02, 0x0a, 0x10, 0x54, 0x61, + 0x73, 0x6b, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x08, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x1a, + 0x3e, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x49, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x12, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, + 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, + 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2b, 0x0a, + 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x37, + 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x8c, 0x01, 0x0a, 0x16, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x61, 0x69, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x57, 0x61, 0x69, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, + 0x1a, 0x37, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x33, 0x0a, 0x11, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x22, 0xac, + 0x02, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, + 0x73, 0x12, 0x33, 0x0a, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x41, 0x75, 0x64, 0x69, + 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x75, 0x64, 0x69, + 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x12, 0x33, 0x0a, 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x37, 0x73, + 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x0a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x12, 0x38, 0x0a, 0x09, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x4c, 0x0a, + 0x04, 0x57, 0x72, 0x61, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xbe, 0x01, 0x0a, 0x0d, + 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x38, 0x0a, 0x09, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, + 0x04, 0x77, 0x72, 0x61, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x6d, 0x37, + 0x73, 0x2e, 0x57, 0x72, 0x61, 0x70, 0x52, 0x04, 0x77, 0x72, 0x61, 0x70, 0x22, 0x29, 0x0a, 0x0b, + 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0c, 0x0a, 0x01, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x01, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x01, 0x65, 0x22, 0x4c, 0x0a, 0x10, 0x4d, 0x65, 0x6d, 0x6f, 0x72, + 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, + 0x24, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x6d, 0x37, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xb0, 0x01, 0x0a, 0x0e, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, + 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x14, + 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, + 0x65, 0x6c, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x70, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x62, 0x70, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x70, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x66, 0x70, 0x73, 0x12, 0x1e, 0x0a, 0x0a, + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0a, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, + 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0x8d, 0x02, 0x0a, 0x15, 0x54, 0x72, 0x61, + 0x63, 0x6b, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x6e, 0x61, 0x70, + 0x53, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x69, + 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0c, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x3e, + 0x0a, 0x06, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, - 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x74, 0x72, - 0x61, 0x63, 0x6b, 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x50, 0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x7b, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, 0x6d, 0x37, - 0x73, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x3d, 0x2a, - 0x2a, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x5e, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x12, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x1a, 0x14, 0x2e, 0x6d, 0x37, 0x73, - 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x5a, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x15, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x37, 0x73, 0x2e, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x65, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x12, 0x5f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x69, 0x6c, 0x79, 0x12, - 0x15, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x6c, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x12, 0x67, 0x0a, 0x0c, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x18, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x6d, - 0x37, 0x73, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x19, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x42, 0x14, 0x5a, 0x12, 0x6d, - 0x37, 0x73, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x2f, 0x6d, 0x37, 0x73, 0x2f, 0x76, 0x35, 0x2f, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2d, + 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x1a, 0x39, 0x0a, + 0x0b, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb4, 0x01, 0x0a, 0x0e, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x6f, 0x64, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, + 0x63, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x62, + 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x62, 0x70, 0x73, 0x12, 0x10, 0x0a, + 0x03, 0x66, 0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x66, 0x70, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x67, 0x6f, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x6f, 0x70, 0x22, + 0x37, 0x0a, 0x0f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x1f, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, + 0x61, 0x74, 0x68, 0x22, 0x6a, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x67, + 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, + 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, + 0x7a, 0x0a, 0x12, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x6e, 0x61, + 0x70, 0x53, 0x68, 0x6f, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x64, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xe8, 0x01, 0x0a, 0x12, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, + 0x6f, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0b, + 0x61, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x52, 0x0b, 0x61, 0x75, 0x64, 0x69, + 0x6f, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, + 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, + 0x37, 0x73, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x6e, 0x61, + 0x70, 0x53, 0x68, 0x6f, 0x74, 0x52, 0x0b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, + 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x32, 0x9a, 0x0c, 0x0a, 0x06, 0x47, 0x6c, 0x6f, 0x62, + 0x61, 0x6c, 0x12, 0x4d, 0x0a, 0x07, 0x53, 0x79, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73, 0x69, 0x6e, 0x66, + 0x6f, 0x12, 0x4d, 0x0a, 0x07, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x12, 0x52, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x12, 0x2e, 0x6d, + 0x37, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, + 0x22, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x2f, + 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x50, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, + 0x12, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, + 0x68, 0x49, 0x64, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x51, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, + 0x65, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x6d, 0x37, 0x73, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x12, 0x57, 0x0a, 0x0a, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, + 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x6c, 0x69, + 0x73, 0x74, 0x12, 0x5d, 0x0a, 0x08, 0x57, 0x61, 0x69, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x57, 0x61, 0x69, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x77, 0x61, 0x69, 0x74, 0x6c, 0x69, 0x73, + 0x74, 0x12, 0x67, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x16, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x6e, 0x61, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x6d, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x6d, + 0x37, 0x73, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x50, 0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x72, 0x0a, 0x0e, 0x41, 0x75, 0x64, + 0x69, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x6e, 0x61, 0x70, 0x12, 0x16, 0x2e, 0x6d, 0x37, + 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, + 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, + 0x64, 0x69, 0x6f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x2f, 0x7b, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x72, 0x0a, + 0x0e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x6e, 0x61, 0x70, 0x12, + 0x16, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x6e, 0x61, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x54, 0x72, + 0x61, 0x63, 0x6b, 0x53, 0x6e, 0x61, 0x70, 0x53, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x2f, 0x73, 0x6e, 0x61, + 0x70, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, + 0x7d, 0x12, 0x7b, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x14, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, + 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2f, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x50, 0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x5e, + 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, + 0x12, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, + 0x68, 0x49, 0x64, 0x1a, 0x14, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1d, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x5a, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x15, 0x2e, 0x6d, 0x37, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x67, 0x65, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x5f, 0x0a, 0x0a, 0x47, 0x65, + 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x15, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, + 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, 0x6f, 0x72, + 0x6d, 0x69, 0x6c, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x67, 0x0a, 0x0c, 0x4d, + 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x2e, 0x6d, 0x37, + 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x6d, 0x37, 0x73, 0x2e, 0x53, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x21, 0x22, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x04, + 0x79, 0x61, 0x6d, 0x6c, 0x42, 0x14, 0x5a, 0x12, 0x6d, 0x37, 0x73, 0x2e, 0x6c, 0x69, 0x76, 0x65, + 0x2f, 0x6d, 0x37, 0x73, 0x2f, 0x76, 0x35, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -2409,7 +2522,7 @@ func file_global_proto_rawDescGZIP() []byte { return file_global_proto_rawDescData } -var file_global_proto_msgTypes = make([]protoimpl.MessageInfo, 34) +var file_global_proto_msgTypes = make([]protoimpl.MessageInfo, 36) var file_global_proto_goTypes = []interface{}{ (*GetConfigRequest)(nil), // 0: m7s.GetConfigRequest (*Formily)(nil), // 1: m7s.Formily @@ -2421,96 +2534,103 @@ var file_global_proto_goTypes = []interface{}{ (*SummaryResponse)(nil), // 7: m7s.SummaryResponse (*PluginInfo)(nil), // 8: m7s.PluginInfo (*SysInfoResponse)(nil), // 9: m7s.SysInfoResponse - (*StreamListRequest)(nil), // 10: m7s.StreamListRequest - (*StreamListResponse)(nil), // 11: m7s.StreamListResponse - (*StreamWaitListResponse)(nil), // 12: m7s.StreamWaitListResponse - (*StreamSnapRequest)(nil), // 13: m7s.StreamSnapRequest - (*StreamInfoResponse)(nil), // 14: m7s.StreamInfoResponse - (*Wrap)(nil), // 15: m7s.Wrap - (*TrackSnapShot)(nil), // 16: m7s.TrackSnapShot - (*MemoryBlock)(nil), // 17: m7s.MemoryBlock - (*MemoryBlockGroup)(nil), // 18: m7s.MemoryBlockGroup - (*AudioTrackInfo)(nil), // 19: m7s.AudioTrackInfo - (*TrackSnapShotResponse)(nil), // 20: m7s.TrackSnapShotResponse - (*VideoTrackInfo)(nil), // 21: m7s.VideoTrackInfo - (*SuccessResponse)(nil), // 22: m7s.SuccessResponse - (*RequestWithId)(nil), // 23: m7s.RequestWithId - (*ChangeSubscribeRequest)(nil), // 24: m7s.ChangeSubscribeRequest - (*SubscribersRequest)(nil), // 25: m7s.SubscribersRequest - (*RingReaderSnapShot)(nil), // 26: m7s.RingReaderSnapShot - (*SubscriberSnapShot)(nil), // 27: m7s.SubscriberSnapShot - (*SubscribersResponse)(nil), // 28: m7s.SubscribersResponse - nil, // 29: m7s.Formily.PropertiesEntry - nil, // 30: m7s.Formily.ComponentPropsEntry - nil, // 31: m7s.FormilyResponse.PropertiesEntry - nil, // 32: m7s.StreamWaitListResponse.ListEntry - nil, // 33: m7s.TrackSnapShotResponse.ReaderEntry - (*timestamppb.Timestamp)(nil), // 34: google.protobuf.Timestamp - (*anypb.Any)(nil), // 35: google.protobuf.Any - (*emptypb.Empty)(nil), // 36: google.protobuf.Empty + (*TaskTreeResponse)(nil), // 10: m7s.TaskTreeResponse + (*StreamListRequest)(nil), // 11: m7s.StreamListRequest + (*StreamListResponse)(nil), // 12: m7s.StreamListResponse + (*StreamWaitListResponse)(nil), // 13: m7s.StreamWaitListResponse + (*StreamSnapRequest)(nil), // 14: m7s.StreamSnapRequest + (*StreamInfoResponse)(nil), // 15: m7s.StreamInfoResponse + (*Wrap)(nil), // 16: m7s.Wrap + (*TrackSnapShot)(nil), // 17: m7s.TrackSnapShot + (*MemoryBlock)(nil), // 18: m7s.MemoryBlock + (*MemoryBlockGroup)(nil), // 19: m7s.MemoryBlockGroup + (*AudioTrackInfo)(nil), // 20: m7s.AudioTrackInfo + (*TrackSnapShotResponse)(nil), // 21: m7s.TrackSnapShotResponse + (*VideoTrackInfo)(nil), // 22: m7s.VideoTrackInfo + (*SuccessResponse)(nil), // 23: m7s.SuccessResponse + (*RequestWithId)(nil), // 24: m7s.RequestWithId + (*ChangeSubscribeRequest)(nil), // 25: m7s.ChangeSubscribeRequest + (*SubscribersRequest)(nil), // 26: m7s.SubscribersRequest + (*RingReaderSnapShot)(nil), // 27: m7s.RingReaderSnapShot + (*SubscriberSnapShot)(nil), // 28: m7s.SubscriberSnapShot + (*SubscribersResponse)(nil), // 29: m7s.SubscribersResponse + nil, // 30: m7s.Formily.PropertiesEntry + nil, // 31: m7s.Formily.ComponentPropsEntry + nil, // 32: m7s.FormilyResponse.PropertiesEntry + nil, // 33: m7s.TaskTreeResponse.DescriptionEntry + nil, // 34: m7s.StreamWaitListResponse.ListEntry + nil, // 35: m7s.TrackSnapShotResponse.ReaderEntry + (*timestamppb.Timestamp)(nil), // 36: google.protobuf.Timestamp + (*anypb.Any)(nil), // 37: google.protobuf.Any + (*emptypb.Empty)(nil), // 38: google.protobuf.Empty } var file_global_proto_depIdxs = []int32{ - 29, // 0: m7s.Formily.properties:type_name -> m7s.Formily.PropertiesEntry - 30, // 1: m7s.Formily.componentProps:type_name -> m7s.Formily.ComponentPropsEntry - 31, // 2: m7s.FormilyResponse.properties:type_name -> m7s.FormilyResponse.PropertiesEntry + 30, // 0: m7s.Formily.properties:type_name -> m7s.Formily.PropertiesEntry + 31, // 1: m7s.Formily.componentProps:type_name -> m7s.Formily.ComponentPropsEntry + 32, // 2: m7s.FormilyResponse.properties:type_name -> m7s.FormilyResponse.PropertiesEntry 6, // 3: m7s.SummaryResponse.memory:type_name -> m7s.Usage 6, // 4: m7s.SummaryResponse.hardDisk:type_name -> m7s.Usage 5, // 5: m7s.SummaryResponse.netWork:type_name -> m7s.NetWorkInfo - 34, // 6: m7s.SysInfoResponse.startTime:type_name -> google.protobuf.Timestamp + 36, // 6: m7s.SysInfoResponse.startTime:type_name -> google.protobuf.Timestamp 8, // 7: m7s.SysInfoResponse.plugins:type_name -> m7s.PluginInfo - 14, // 8: m7s.StreamListResponse.list:type_name -> m7s.StreamInfoResponse - 32, // 9: m7s.StreamWaitListResponse.list:type_name -> m7s.StreamWaitListResponse.ListEntry - 19, // 10: m7s.StreamInfoResponse.audioTrack:type_name -> m7s.AudioTrackInfo - 21, // 11: m7s.StreamInfoResponse.videoTrack:type_name -> m7s.VideoTrackInfo - 34, // 12: m7s.StreamInfoResponse.startTime:type_name -> google.protobuf.Timestamp - 34, // 13: m7s.TrackSnapShot.writeTime:type_name -> google.protobuf.Timestamp - 15, // 14: m7s.TrackSnapShot.wrap:type_name -> m7s.Wrap - 17, // 15: m7s.MemoryBlockGroup.list:type_name -> m7s.MemoryBlock - 16, // 16: m7s.TrackSnapShotResponse.ring:type_name -> m7s.TrackSnapShot - 33, // 17: m7s.TrackSnapShotResponse.reader:type_name -> m7s.TrackSnapShotResponse.ReaderEntry - 18, // 18: m7s.TrackSnapShotResponse.memory:type_name -> m7s.MemoryBlockGroup - 34, // 19: m7s.SubscriberSnapShot.startTime:type_name -> google.protobuf.Timestamp - 26, // 20: m7s.SubscriberSnapShot.audioReader:type_name -> m7s.RingReaderSnapShot - 26, // 21: m7s.SubscriberSnapShot.videoReader:type_name -> m7s.RingReaderSnapShot - 27, // 22: m7s.SubscribersResponse.list:type_name -> m7s.SubscriberSnapShot - 1, // 23: m7s.Formily.PropertiesEntry.value:type_name -> m7s.Formily - 35, // 24: m7s.Formily.ComponentPropsEntry.value:type_name -> google.protobuf.Any - 1, // 25: m7s.FormilyResponse.PropertiesEntry.value:type_name -> m7s.Formily - 36, // 26: m7s.Global.SysInfo:input_type -> google.protobuf.Empty - 36, // 27: m7s.Global.Summary:input_type -> google.protobuf.Empty - 23, // 28: m7s.Global.Shutdown:input_type -> m7s.RequestWithId - 23, // 29: m7s.Global.Restart:input_type -> m7s.RequestWithId - 10, // 30: m7s.Global.StreamList:input_type -> m7s.StreamListRequest - 36, // 31: m7s.Global.WaitList:input_type -> google.protobuf.Empty - 13, // 32: m7s.Global.StreamInfo:input_type -> m7s.StreamSnapRequest - 25, // 33: m7s.Global.GetSubscribers:input_type -> m7s.SubscribersRequest - 13, // 34: m7s.Global.AudioTrackSnap:input_type -> m7s.StreamSnapRequest - 13, // 35: m7s.Global.VideoTrackSnap:input_type -> m7s.StreamSnapRequest - 24, // 36: m7s.Global.ChangeSubscribe:input_type -> m7s.ChangeSubscribeRequest - 23, // 37: m7s.Global.StopSubscribe:input_type -> m7s.RequestWithId - 0, // 38: m7s.Global.GetConfig:input_type -> m7s.GetConfigRequest - 0, // 39: m7s.Global.GetFormily:input_type -> m7s.GetConfigRequest - 4, // 40: m7s.Global.ModifyConfig:input_type -> m7s.ModifyConfigRequest - 9, // 41: m7s.Global.SysInfo:output_type -> m7s.SysInfoResponse - 7, // 42: m7s.Global.Summary:output_type -> m7s.SummaryResponse - 36, // 43: m7s.Global.Shutdown:output_type -> google.protobuf.Empty - 36, // 44: m7s.Global.Restart:output_type -> google.protobuf.Empty - 11, // 45: m7s.Global.StreamList:output_type -> m7s.StreamListResponse - 12, // 46: m7s.Global.WaitList:output_type -> m7s.StreamWaitListResponse - 14, // 47: m7s.Global.StreamInfo:output_type -> m7s.StreamInfoResponse - 28, // 48: m7s.Global.GetSubscribers:output_type -> m7s.SubscribersResponse - 20, // 49: m7s.Global.AudioTrackSnap:output_type -> m7s.TrackSnapShotResponse - 20, // 50: m7s.Global.VideoTrackSnap:output_type -> m7s.TrackSnapShotResponse - 22, // 51: m7s.Global.ChangeSubscribe:output_type -> m7s.SuccessResponse - 22, // 52: m7s.Global.StopSubscribe:output_type -> m7s.SuccessResponse - 3, // 53: m7s.Global.GetConfig:output_type -> m7s.GetConfigResponse - 3, // 54: m7s.Global.GetFormily:output_type -> m7s.GetConfigResponse - 22, // 55: m7s.Global.ModifyConfig:output_type -> m7s.SuccessResponse - 41, // [41:56] is the sub-list for method output_type - 26, // [26:41] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 36, // 8: m7s.TaskTreeResponse.startTime:type_name -> google.protobuf.Timestamp + 33, // 9: m7s.TaskTreeResponse.description:type_name -> m7s.TaskTreeResponse.DescriptionEntry + 10, // 10: m7s.TaskTreeResponse.children:type_name -> m7s.TaskTreeResponse + 15, // 11: m7s.StreamListResponse.list:type_name -> m7s.StreamInfoResponse + 34, // 12: m7s.StreamWaitListResponse.list:type_name -> m7s.StreamWaitListResponse.ListEntry + 20, // 13: m7s.StreamInfoResponse.audioTrack:type_name -> m7s.AudioTrackInfo + 22, // 14: m7s.StreamInfoResponse.videoTrack:type_name -> m7s.VideoTrackInfo + 36, // 15: m7s.StreamInfoResponse.startTime:type_name -> google.protobuf.Timestamp + 36, // 16: m7s.TrackSnapShot.writeTime:type_name -> google.protobuf.Timestamp + 16, // 17: m7s.TrackSnapShot.wrap:type_name -> m7s.Wrap + 18, // 18: m7s.MemoryBlockGroup.list:type_name -> m7s.MemoryBlock + 17, // 19: m7s.TrackSnapShotResponse.ring:type_name -> m7s.TrackSnapShot + 35, // 20: m7s.TrackSnapShotResponse.reader:type_name -> m7s.TrackSnapShotResponse.ReaderEntry + 19, // 21: m7s.TrackSnapShotResponse.memory:type_name -> m7s.MemoryBlockGroup + 36, // 22: m7s.SubscriberSnapShot.startTime:type_name -> google.protobuf.Timestamp + 27, // 23: m7s.SubscriberSnapShot.audioReader:type_name -> m7s.RingReaderSnapShot + 27, // 24: m7s.SubscriberSnapShot.videoReader:type_name -> m7s.RingReaderSnapShot + 28, // 25: m7s.SubscribersResponse.list:type_name -> m7s.SubscriberSnapShot + 1, // 26: m7s.Formily.PropertiesEntry.value:type_name -> m7s.Formily + 37, // 27: m7s.Formily.ComponentPropsEntry.value:type_name -> google.protobuf.Any + 1, // 28: m7s.FormilyResponse.PropertiesEntry.value:type_name -> m7s.Formily + 38, // 29: m7s.Global.SysInfo:input_type -> google.protobuf.Empty + 38, // 30: m7s.Global.Summary:input_type -> google.protobuf.Empty + 24, // 31: m7s.Global.Shutdown:input_type -> m7s.RequestWithId + 24, // 32: m7s.Global.Restart:input_type -> m7s.RequestWithId + 38, // 33: m7s.Global.TaskTree:input_type -> google.protobuf.Empty + 11, // 34: m7s.Global.StreamList:input_type -> m7s.StreamListRequest + 38, // 35: m7s.Global.WaitList:input_type -> google.protobuf.Empty + 14, // 36: m7s.Global.StreamInfo:input_type -> m7s.StreamSnapRequest + 26, // 37: m7s.Global.GetSubscribers:input_type -> m7s.SubscribersRequest + 14, // 38: m7s.Global.AudioTrackSnap:input_type -> m7s.StreamSnapRequest + 14, // 39: m7s.Global.VideoTrackSnap:input_type -> m7s.StreamSnapRequest + 25, // 40: m7s.Global.ChangeSubscribe:input_type -> m7s.ChangeSubscribeRequest + 24, // 41: m7s.Global.StopSubscribe:input_type -> m7s.RequestWithId + 0, // 42: m7s.Global.GetConfig:input_type -> m7s.GetConfigRequest + 0, // 43: m7s.Global.GetFormily:input_type -> m7s.GetConfigRequest + 4, // 44: m7s.Global.ModifyConfig:input_type -> m7s.ModifyConfigRequest + 9, // 45: m7s.Global.SysInfo:output_type -> m7s.SysInfoResponse + 7, // 46: m7s.Global.Summary:output_type -> m7s.SummaryResponse + 38, // 47: m7s.Global.Shutdown:output_type -> google.protobuf.Empty + 38, // 48: m7s.Global.Restart:output_type -> google.protobuf.Empty + 10, // 49: m7s.Global.TaskTree:output_type -> m7s.TaskTreeResponse + 12, // 50: m7s.Global.StreamList:output_type -> m7s.StreamListResponse + 13, // 51: m7s.Global.WaitList:output_type -> m7s.StreamWaitListResponse + 15, // 52: m7s.Global.StreamInfo:output_type -> m7s.StreamInfoResponse + 29, // 53: m7s.Global.GetSubscribers:output_type -> m7s.SubscribersResponse + 21, // 54: m7s.Global.AudioTrackSnap:output_type -> m7s.TrackSnapShotResponse + 21, // 55: m7s.Global.VideoTrackSnap:output_type -> m7s.TrackSnapShotResponse + 23, // 56: m7s.Global.ChangeSubscribe:output_type -> m7s.SuccessResponse + 23, // 57: m7s.Global.StopSubscribe:output_type -> m7s.SuccessResponse + 3, // 58: m7s.Global.GetConfig:output_type -> m7s.GetConfigResponse + 3, // 59: m7s.Global.GetFormily:output_type -> m7s.GetConfigResponse + 23, // 60: m7s.Global.ModifyConfig:output_type -> m7s.SuccessResponse + 45, // [45:61] is the sub-list for method output_type + 29, // [29:45] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_global_proto_init() } @@ -2640,7 +2760,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamListRequest); i { + switch v := v.(*TaskTreeResponse); i { case 0: return &v.state case 1: @@ -2652,7 +2772,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamListResponse); i { + switch v := v.(*StreamListRequest); i { case 0: return &v.state case 1: @@ -2664,7 +2784,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamWaitListResponse); i { + switch v := v.(*StreamListResponse); i { case 0: return &v.state case 1: @@ -2676,7 +2796,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamSnapRequest); i { + switch v := v.(*StreamWaitListResponse); i { case 0: return &v.state case 1: @@ -2688,7 +2808,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamInfoResponse); i { + switch v := v.(*StreamSnapRequest); i { case 0: return &v.state case 1: @@ -2700,7 +2820,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Wrap); i { + switch v := v.(*StreamInfoResponse); i { case 0: return &v.state case 1: @@ -2712,7 +2832,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TrackSnapShot); i { + switch v := v.(*Wrap); i { case 0: return &v.state case 1: @@ -2724,7 +2844,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MemoryBlock); i { + switch v := v.(*TrackSnapShot); i { case 0: return &v.state case 1: @@ -2736,7 +2856,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MemoryBlockGroup); i { + switch v := v.(*MemoryBlock); i { case 0: return &v.state case 1: @@ -2748,7 +2868,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AudioTrackInfo); i { + switch v := v.(*MemoryBlockGroup); i { case 0: return &v.state case 1: @@ -2760,7 +2880,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TrackSnapShotResponse); i { + switch v := v.(*AudioTrackInfo); i { case 0: return &v.state case 1: @@ -2772,7 +2892,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VideoTrackInfo); i { + switch v := v.(*TrackSnapShotResponse); i { case 0: return &v.state case 1: @@ -2784,7 +2904,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SuccessResponse); i { + switch v := v.(*VideoTrackInfo); i { case 0: return &v.state case 1: @@ -2796,7 +2916,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestWithId); i { + switch v := v.(*SuccessResponse); i { case 0: return &v.state case 1: @@ -2808,7 +2928,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeSubscribeRequest); i { + switch v := v.(*RequestWithId); i { case 0: return &v.state case 1: @@ -2820,7 +2940,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubscribersRequest); i { + switch v := v.(*ChangeSubscribeRequest); i { case 0: return &v.state case 1: @@ -2832,7 +2952,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RingReaderSnapShot); i { + switch v := v.(*SubscribersRequest); i { case 0: return &v.state case 1: @@ -2844,7 +2964,7 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubscriberSnapShot); i { + switch v := v.(*RingReaderSnapShot); i { case 0: return &v.state case 1: @@ -2856,6 +2976,18 @@ func file_global_proto_init() { } } file_global_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscriberSnapShot); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_global_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubscribersResponse); i { case 0: return &v.state @@ -2874,7 +3006,7 @@ func file_global_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_global_proto_rawDesc, NumEnums: 0, - NumMessages: 34, + NumMessages: 36, NumExtensions: 0, NumServices: 1, }, diff --git a/pb/global.pb.gw.go b/pb/global.pb.gw.go index f3f8269..4b40ac3 100644 --- a/pb/global.pb.gw.go +++ b/pb/global.pb.gw.go @@ -172,6 +172,24 @@ func local_request_Global_Restart_0(ctx context.Context, marshaler runtime.Marsh } +func request_Global_TaskTree_0(ctx context.Context, marshaler runtime.Marshaler, client GlobalClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := client.TaskTree(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Global_TaskTree_0(ctx context.Context, marshaler runtime.Marshaler, server GlobalServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := server.TaskTree(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Global_StreamList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -862,6 +880,31 @@ func RegisterGlobalHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser }) + mux.Handle("GET", pattern_Global_TaskTree_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/m7s.Global/TaskTree", runtime.WithHTTPPathPattern("/api/task/tree")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Global_TaskTree_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Global_TaskTree_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Global_StreamList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1266,6 +1309,28 @@ func RegisterGlobalHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli }) + mux.Handle("GET", pattern_Global_TaskTree_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/m7s.Global/TaskTree", runtime.WithHTTPPathPattern("/api/task/tree")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Global_TaskTree_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Global_TaskTree_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Global_StreamList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1520,6 +1585,8 @@ var ( pattern_Global_Restart_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"api", "restart", "id"}, "")) + pattern_Global_TaskTree_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "task", "tree"}, "")) + pattern_Global_StreamList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "stream", "list"}, "")) pattern_Global_WaitList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "stream", "waitlist"}, "")) @@ -1552,6 +1619,8 @@ var ( forward_Global_Restart_0 = runtime.ForwardResponseMessage + forward_Global_TaskTree_0 = runtime.ForwardResponseMessage + forward_Global_StreamList_0 = runtime.ForwardResponseMessage forward_Global_WaitList_0 = runtime.ForwardResponseMessage diff --git a/pb/global.proto b/pb/global.proto index e3c5bf3..76b8c1a 100644 --- a/pb/global.proto +++ b/pb/global.proto @@ -27,6 +27,11 @@ service Global { post: "/api/restart/{id}" }; } + rpc TaskTree (google.protobuf.Empty) returns (TaskTreeResponse) { + option (google.api.http) = { + get: "/api/task/tree" + }; + } rpc StreamList (StreamListRequest) returns (StreamListResponse) { option (google.api.http) = { get: "/api/stream/list" @@ -159,6 +164,15 @@ message SysInfoResponse { repeated PluginInfo plugins = 8; } +message TaskTreeResponse { + uint32 id = 1; + string type = 2; + string owner = 3; + google.protobuf.Timestamp startTime = 4; + map description = 5; + repeated TaskTreeResponse children = 6; +} + message StreamListRequest { int32 pageNum = 1; int32 pageSize = 2; diff --git a/pb/global_grpc.pb.go b/pb/global_grpc.pb.go index cc8c6a7..9f6d370 100644 --- a/pb/global_grpc.pb.go +++ b/pb/global_grpc.pb.go @@ -27,6 +27,7 @@ type GlobalClient interface { Summary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SummaryResponse, error) Shutdown(ctx context.Context, in *RequestWithId, opts ...grpc.CallOption) (*emptypb.Empty, error) Restart(ctx context.Context, in *RequestWithId, opts ...grpc.CallOption) (*emptypb.Empty, error) + TaskTree(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TaskTreeResponse, error) StreamList(ctx context.Context, in *StreamListRequest, opts ...grpc.CallOption) (*StreamListResponse, error) WaitList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StreamWaitListResponse, error) StreamInfo(ctx context.Context, in *StreamSnapRequest, opts ...grpc.CallOption) (*StreamInfoResponse, error) @@ -84,6 +85,15 @@ func (c *globalClient) Restart(ctx context.Context, in *RequestWithId, opts ...g return out, nil } +func (c *globalClient) TaskTree(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TaskTreeResponse, error) { + out := new(TaskTreeResponse) + err := c.cc.Invoke(ctx, "/m7s.Global/TaskTree", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *globalClient) StreamList(ctx context.Context, in *StreamListRequest, opts ...grpc.CallOption) (*StreamListResponse, error) { out := new(StreamListResponse) err := c.cc.Invoke(ctx, "/m7s.Global/StreamList", in, out, opts...) @@ -191,6 +201,7 @@ type GlobalServer interface { Summary(context.Context, *emptypb.Empty) (*SummaryResponse, error) Shutdown(context.Context, *RequestWithId) (*emptypb.Empty, error) Restart(context.Context, *RequestWithId) (*emptypb.Empty, error) + TaskTree(context.Context, *emptypb.Empty) (*TaskTreeResponse, error) StreamList(context.Context, *StreamListRequest) (*StreamListResponse, error) WaitList(context.Context, *emptypb.Empty) (*StreamWaitListResponse, error) StreamInfo(context.Context, *StreamSnapRequest) (*StreamInfoResponse, error) @@ -221,6 +232,9 @@ func (UnimplementedGlobalServer) Shutdown(context.Context, *RequestWithId) (*emp func (UnimplementedGlobalServer) Restart(context.Context, *RequestWithId) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Restart not implemented") } +func (UnimplementedGlobalServer) TaskTree(context.Context, *emptypb.Empty) (*TaskTreeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TaskTree not implemented") +} func (UnimplementedGlobalServer) StreamList(context.Context, *StreamListRequest) (*StreamListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StreamList not implemented") } @@ -339,6 +353,24 @@ func _Global_Restart_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Global_TaskTree_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GlobalServer).TaskTree(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/m7s.Global/TaskTree", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GlobalServer).TaskTree(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + func _Global_StreamList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(StreamListRequest) if err := dec(in); err != nil { @@ -560,6 +592,10 @@ var Global_ServiceDesc = grpc.ServiceDesc{ MethodName: "Restart", Handler: _Global_Restart_Handler, }, + { + MethodName: "TaskTree", + Handler: _Global_TaskTree_Handler, + }, { MethodName: "StreamList", Handler: _Global_StreamList_Handler, diff --git a/pkg/util/task-channel.go b/pkg/util/task-channel.go index 0dd2d88..3c90b84 100644 --- a/pkg/util/task-channel.go +++ b/pkg/util/task-channel.go @@ -8,8 +8,12 @@ type ChannelTask struct { callback reflect.Value } -func (t *ChannelTask) start() (reflect.Value, error) { - return t.channel, nil +func (t *ChannelTask) GetTaskType() string { + return "channel" +} + +func (t *ChannelTask) getSignal() reflect.Value { + return t.channel } func (t *ChannelTask) tick(signal reflect.Value) { diff --git a/pkg/util/task-macro.go b/pkg/util/task-macro.go index 8b4bb01..072e71b 100644 --- a/pkg/util/task-macro.go +++ b/pkg/util/task-macro.go @@ -18,8 +18,7 @@ func GetNextTaskID() uint32 { } func init() { - RootTask.Name = "root" - RootTask.init(context.Background()) + RootTask.initTask(context.Background(), &RootTask) RootTask.Logger = slog.New(slog.NewTextHandler(os.Stdout, nil)) } @@ -27,9 +26,13 @@ type MarcoLongTask struct { MarcoTask } -func (task *MarcoLongTask) start() (signal reflect.Value, err error) { - task.keepAlive = true - return task.MarcoTask.start() +func (m *MarcoLongTask) initTask(ctx context.Context, task ITask) { + m.MarcoTask.initTask(ctx, task) + m.keepAlive = true +} + +func (m *MarcoLongTask) GetTaskType() string { + return "long" } // MarcoTask include sub tasks @@ -41,8 +44,16 @@ type MarcoTask struct { keepAlive bool } -func (mt *MarcoTask) init(ctx context.Context) { - mt.Task.init(ctx) +func (m *MarcoTask) GetTaskType() string { + return "marco" +} + +func (mt *MarcoTask) getMaroTask() *MarcoTask { + return mt +} + +func (mt *MarcoTask) initTask(ctx context.Context, task ITask) { + mt.Task.initTask(ctx, task) mt.shutdown = nil mt.addSub = make(chan ITask, 10) } @@ -50,13 +61,13 @@ func (mt *MarcoTask) init(ctx context.Context) { func (mt *MarcoTask) dispose() { reason := mt.StopReason() if mt.Logger != nil { - mt.Debug("task dispose", "reason", reason, "taskId", mt.ID, "taskName", mt.Name) + mt.Debug("task dispose", "reason", reason, "taskId", mt.ID, "taskType", mt.GetTaskType(), "ownerType", mt.GetOwnerType()) } mt.disposeHandler() close(mt.addSub) _ = mt.WaitStopped() if mt.Logger != nil { - mt.Debug("task disposed", "reason", reason, "taskId", mt.ID, "taskName", mt.Name) + mt.Debug("task disposed", "reason", reason, "taskId", mt.ID, "taskType", mt.GetTaskType(), "ownerType", mt.GetOwnerType()) } for _, listener := range mt.afterDisposeListeners { listener() @@ -91,19 +102,31 @@ func (mt *MarcoTask) lazyStart(t ITask) { mt.addSub <- t } +func (mt *MarcoTask) Range(callback func(task *Task, m *MarcoTask) bool) { + for _, task := range mt.children { + var m *MarcoTask + if v, ok := task.(interface{ getMaroTask() *MarcoTask }); ok { + m = v.getMaroTask() + } + callback(task.getTask(), m) + } +} + func (mt *MarcoTask) AddTask(task ITask) *Task { + t := task.getTask() + if t.parentCtx != nil && task.IsStopped() { //reuse task + t.parent = nil + return mt.AddTaskWithContext(t.parentCtx, task) + } return mt.AddTaskWithContext(mt.Context, task) } func (mt *MarcoTask) AddTaskWithContext(ctx context.Context, t ITask) (task *Task) { + if ctx == nil && mt.Context == nil { + panic("context is nil") + } if task = t.getTask(); task.parent == nil { - t.init(ctx) - if v, ok := t.(TaskStarter); ok { - task.startHandler = v.Start - } - if v, ok := t.(TaskDisposal); ok { - task.disposeHandler = v.Dispose - } + t.initTask(ctx, t) } mt.lazyStart(t) return @@ -116,7 +139,6 @@ func (mt *MarcoTask) Call(callback func() error) { func CreateTaskByCallBack(start func() error, dispose func()) *Task { var task Task - task.Name = "call" task.startHandler = func() error { err := start() if err == nil && dispose == nil { @@ -130,8 +152,7 @@ func CreateTaskByCallBack(start func() error, dispose func()) *Task { func (mt *MarcoTask) AddChan(channel any, callback any) *ChannelTask { var chanTask ChannelTask - chanTask.Name = "channel" - chanTask.init(mt.Context) + chanTask.initTask(mt.Context, &chanTask) chanTask.channel = reflect.ValueOf(channel) chanTask.callback = reflect.ValueOf(callback) mt.lazyStart(&chanTask) @@ -158,9 +179,9 @@ func (mt *MarcoTask) run() { return } if task := rev.Interface().(ITask); task.getParent() == mt { - if signal, err := task.start(); err == nil { + if err := task.start(); err == nil { mt.children = append(mt.children, task) - cases = append(cases, reflect.SelectCase{Dir: reflect.SelectRecv, Chan: signal}) + cases = append(cases, reflect.SelectCase{Dir: reflect.SelectRecv, Chan: task.getSignal()}) } else { task.Stop(err) } diff --git a/pkg/util/task-retry.go b/pkg/util/task-retry.go deleted file mode 100644 index 6c5e8f2..0000000 --- a/pkg/util/task-retry.go +++ /dev/null @@ -1,48 +0,0 @@ -package util - -import ( - "errors" - "fmt" - "reflect" - "time" -) - -var ErrRetryRunOut = errors.New("retry run out") - -type RetryTask struct { - Task - MaxRetry int - RetryCount int - RetryInterval time.Duration -} - -func (task *RetryTask) start() (signal reflect.Value, err error) { - task.StartTime = time.Now() - for !task.parent.IsStopped() { - err = task.startHandler() - if task.Logger != nil { - task.Debug("task start", "taskId", task.ID) - } - task.startup.Fulfill(err) - if err == nil { - return - } - if task.MaxRetry < 0 || task.RetryCount < task.MaxRetry { - task.RetryCount++ - if delta := time.Since(task.StartTime); delta < task.RetryInterval { - time.Sleep(task.RetryInterval - delta) - } - if task.Logger != nil { - task.Warn(fmt.Sprintf("retry %d/%d", task.RetryCount, task.MaxRetry)) - } - task.init(task.parentCtx) - } else { - if task.Logger != nil { - task.Warn(fmt.Sprintf("max retry %d failed", task.MaxRetry)) - } - task.Stop(ErrRetryRunOut) - return reflect.ValueOf(task.Done()), nil - } - } - return -} diff --git a/pkg/util/task.go b/pkg/util/task.go index 749dd3e..ac90859 100644 --- a/pkg/util/task.go +++ b/pkg/util/task.go @@ -3,6 +3,7 @@ package util import ( "context" "errors" + "fmt" "log/slog" "reflect" "time" @@ -12,21 +13,29 @@ const TraceLevel = slog.Level(-8) var ( ErrAutoStop = errors.New("auto stop") - ErrCallbackTask = errors.New("callback task") + ErrCallbackTask = errors.New("callback") + ErrRetryRunOut = errors.New("retry out") + ErrTaskComplete = errors.New("complete") EmptyStart = func() error { return nil } EmptyDispose = func() {} ) type ( ITask interface { - init(ctx context.Context) + initTask(context.Context, ITask) getParent() *MarcoTask getTask() *Task + getSignal() reflect.Value Stop(error) StopReason() error - start() (reflect.Value, error) + start() error dispose() IsStopped() bool + GetTaskType() string + GetOwnerType() string + } + IMarcoTask interface { + Range(func(yield ITask) bool) } IChannelTask interface { tick(reflect.Value) @@ -37,14 +46,23 @@ type ( TaskDisposal interface { Dispose() } + TaskBlock interface { + Run() error + } + RetryConfig struct { + MaxRetry int + RetryCount int + RetryInterval time.Duration + } Task struct { ID uint32 - Name string StartTime time.Time *slog.Logger context.Context context.CancelCauseFunc - startHandler func() error + retry RetryConfig + owner reflect.Type + startHandler, runHandler func() error afterStartListeners, afterDisposeListeners []func() disposeHandler func() Description map[string]any @@ -54,6 +72,19 @@ type ( } ) +func (task *Task) SetRetry(maxRetry int, retryInterval time.Duration) { + task.retry.MaxRetry = maxRetry + task.retry.RetryInterval = retryInterval +} + +func (task *Task) GetOwnerType() string { + return task.owner.Name() +} + +func (task *Task) GetTaskType() string { + return "base" +} + func (task *Task) getTask() *Task { return task } @@ -71,6 +102,7 @@ func (task *Task) WaitStarted() error { } func (task *Task) WaitStopped() error { + _ = task.WaitStarted() if task.shutdown == nil { return task.StopReason() } @@ -92,7 +124,7 @@ func (task *Task) StopReason() error { func (task *Task) Stop(err error) { if task.CancelCauseFunc != nil { if task.Logger != nil { - task.Debug("task stop", "reason", err.Error(), "elapsed", time.Since(task.StartTime), "taskId", task.ID, "taskName", task.Name) + task.Debug("task stop", "reason", err.Error(), "elapsed", time.Since(task.StartTime), "taskId", task.ID, "taskType", task.GetTaskType(), "ownerType", task.GetOwnerType()) } task.CancelCauseFunc(err) } @@ -106,24 +138,44 @@ func (task *Task) OnDispose(listener func()) { task.afterDisposeListeners = append(task.afterDisposeListeners, listener) } -func (task *Task) start() (signal reflect.Value, err error) { +func (task *Task) getSignal() reflect.Value { + return reflect.ValueOf(task.Done()) +} + +func (task *Task) start() (err error) { task.StartTime = time.Now() - err = task.startHandler() if task.Logger != nil { - task.Debug("task start", "taskId", task.ID, "taskName", task.Name) + task.Debug("task start", "taskId", task.ID, "taskType", task.GetTaskType(), "ownerType", task.GetOwnerType()) + } + for task.retry.MaxRetry < 0 || task.retry.RetryCount <= task.retry.MaxRetry { + err = task.startHandler() + if err == nil { + break + } else if task.IsStopped() { + return task.StopReason() + } + task.retry.RetryCount++ + if task.Logger != nil { + task.Warn(fmt.Sprintf("retry %d/%d", task.retry.RetryCount, task.retry.MaxRetry)) + } + if delta := time.Since(task.StartTime); delta < task.retry.RetryInterval { + time.Sleep(task.retry.RetryInterval - delta) + } } task.startup.Fulfill(err) - signal = reflect.ValueOf(task.Done()) for _, listener := range task.afterStartListeners { listener() } + if task.runHandler != nil { + go task.run() + } return } func (task *Task) dispose() { reason := task.StopReason() if task.Logger != nil { - task.Debug("task dispose", "reason", reason, "taskId", task.ID, "taskName", task.Name) + task.Debug("task dispose", "reason", reason, "taskId", task.ID, "taskType", task.GetTaskType(), "ownerType", task.GetOwnerType()) } task.disposeHandler() task.shutdown.Fulfill(reason) @@ -132,9 +184,49 @@ func (task *Task) dispose() { } } -func (task *Task) init(ctx context.Context) { +func (task *Task) initTask(ctx context.Context, iTask ITask) { task.parentCtx = ctx task.Context, task.CancelCauseFunc = context.WithCancelCause(ctx) task.startup = NewPromise(task.Context) task.shutdown = NewPromise(context.Background()) + task.owner = reflect.TypeOf(iTask) + if v, ok := iTask.(TaskStarter); ok { + task.startHandler = v.Start + } + if v, ok := iTask.(TaskDisposal); ok { + task.disposeHandler = v.Dispose + } + if v, ok := iTask.(TaskBlock); ok { + task.runHandler = v.Run + } +} + +func (task *Task) ResetRetryCount() { + task.retry.RetryCount = 0 +} + +func (task *Task) run() { + var err error + retry := task.retry + for !task.IsStopped() { + if retry.MaxRetry < 0 || retry.RetryCount <= retry.MaxRetry { + err = task.runHandler() + if err == nil { + task.Stop(ErrTaskComplete) + } else { + retry.RetryCount++ + if task.Logger != nil { + task.Warn(fmt.Sprintf("retry %d/%d", retry.RetryCount, retry.MaxRetry)) + } + if delta := time.Since(task.StartTime); delta < retry.RetryInterval { + time.Sleep(retry.RetryInterval - delta) + } + } + } else { + if task.Logger != nil { + task.Warn(fmt.Sprintf("max retry %d failed", retry.MaxRetry)) + } + task.Stop(errors.Join(err, ErrRetryRunOut)) + } + } } diff --git a/pkg/util/task_test.go b/pkg/util/task_test.go index 8c1ef9e..1cb2d2f 100644 --- a/pkg/util/task_test.go +++ b/pkg/util/task_test.go @@ -11,7 +11,7 @@ import ( func createMarcoTask() *MarcoTask { var mt MarcoTask - mt.init(context.Background()) + mt.initTask(context.Background()) mt.Logger = slog.New(slog.NewTextHandler(os.Stdout, nil)) return &mt } @@ -54,7 +54,7 @@ func Test_RetryTask(t *testing.T) { func Test_Call_ExecutesCallback(t *testing.T) { mt := createMarcoTask() called := false - mt.Call(func(*Task) error { + mt.Call(func() error { called = true return nil }) @@ -63,21 +63,6 @@ func Test_Call_ExecutesCallback(t *testing.T) { } } -func Test_AddCall_AddsCallbackTask(t *testing.T) { - mt := createMarcoTask() - called := false - task := mt.AddCall(func(*Task) error { - return nil - }, func() { - called = true - }) - task.Stop(ErrCallbackTask) - mt.WaitStopped() - if !called { - t.Errorf("expected callback to be called") - } -} - func Test_AddChan_AddsChannelTask(t *testing.T) { mt := createMarcoTask() channel := time.NewTimer(time.Millisecond * 100) diff --git a/plugin.go b/plugin.go index dc8320c..e0c2276 100644 --- a/plugin.go +++ b/plugin.go @@ -53,7 +53,6 @@ func (plugin *PluginMeta) Init(s *Server, userConfig map[string]any) (p *Plugin) p.Meta = plugin p.Server = s p.Logger = s.Logger.With("plugin", plugin.Name) - p.Name = plugin.Name upperName := strings.ToUpper(plugin.Name) if os.Getenv(upperName+"_ENABLE") == "false" { p.Disabled = true @@ -107,7 +106,7 @@ func (plugin *PluginMeta) Init(s *Server, userConfig map[string]any) (p *Plugin) } } } - p.Description = map[string]any{"name": plugin.Name, "version": plugin.Version} + p.Description = map[string]any{"version": plugin.Version} return } diff --git a/plugin/console/index.go b/plugin/console/index.go index 65b125d..779cc6b 100644 --- a/plugin/console/index.go +++ b/plugin/console/index.go @@ -9,6 +9,7 @@ import ( "github.com/quic-go/quic-go" "io" "m7s.live/m7s/v5" + "m7s.live/m7s/v5/pkg/util" "net" "net/http" "strings" @@ -58,17 +59,24 @@ type ConsolePlugin struct { var _ = m7s.InstallPlugin[ConsolePlugin]() -func (cfg *ConsolePlugin) connect() (conn quic.Connection, err error) { +type ConnectServerTask struct { + util.Task + cfg *ConsolePlugin + quic.Connection +} + +func (task *ConnectServerTask) Start() (err error) { tlsConf := &tls.Config{ InsecureSkipVerify: true, NextProtos: []string{"monibuca"}, } - conn, err = quic.DialAddr(cfg.Context, cfg.Server, tlsConf, &quic.Config{ + cfg := task.cfg + task.Connection, err = quic.DialAddr(cfg.Context, cfg.Server, tlsConf, &quic.Config{ KeepAlivePeriod: time.Second * 10, EnableDatagrams: true, }) if stream := quic.Stream(nil); err == nil { - if stream, err = conn.OpenStreamSync(cfg.Context); err == nil { + if stream, err = task.OpenStreamSync(cfg.Context); err == nil { _, err = stream.Write(append([]byte{1}, (cfg.Secret + "\n")...)) if msg := []byte(nil); err == nil { if msg, err = bufio.NewReader(stream).ReadSlice(0); err == nil { @@ -76,7 +84,7 @@ func (cfg *ConsolePlugin) connect() (conn quic.Connection, err error) { if err = json.Unmarshal(msg[:len(msg)-1], &rMessage); err == nil { if rMessage["code"].(float64) != 0 { // cfg.Error("response from console server ", cfg.Server, rMessage["msg"]) - return nil, fmt.Errorf("response from console server %s %s", cfg.Server, rMessage["msg"]) + return fmt.Errorf("response from console server %s %s", cfg.Server, rMessage["msg"]) } else { // cfg.reportStream = stream cfg.Info("response from console server ", cfg.Server, rMessage) @@ -95,81 +103,89 @@ func (cfg *ConsolePlugin) connect() (conn quic.Connection, err error) { return } -func (cfg *ConsolePlugin) OnInit() error { - if cfg.Secret == "" { - return nil - } - conn, err := cfg.connect() - if err != nil { - return err - } - go func() { - for !cfg.IsStopped() { - for err == nil { - var s quic.Stream - if s, err = conn.AcceptStream(cfg.Context); err == nil { - go cfg.ReceiveRequest(s, conn) - } - } - time.Sleep(time.Second) - conn, err = cfg.connect() - if err != nil { - break - } +func (task *ConnectServerTask) Run() (err error) { + for err == nil { + var s quic.Stream + if s, err = task.AcceptStream(task.Task.Context); err == nil { + task.cfg.AddTask(&ReceiveRequestTask{ + stream: s, + handler: task.cfg.GetGlobalCommonConf().GetHandler(), + conn: task.Connection, + }) } - }() - return err + } + return } -func (cfg *ConsolePlugin) ReceiveRequest(s quic.Stream, conn quic.Connection) error { - defer s.Close() - wr := &myResponseWriter2{Stream: s} - reader := bufio.NewReader(s) - var req *http.Request +type ReceiveRequestTask struct { + util.Task + stream quic.Stream + handler http.Handler + conn quic.Connection + req *http.Request +} + +func (task *ReceiveRequestTask) Start() (err error) { + reader := bufio.NewReader(task.stream) url, _, err := reader.ReadLine() if err == nil { - ctx, cancel := context.WithCancel(s.Context()) + ctx, cancel := context.WithCancel(task.stream.Context()) defer cancel() - req, err = http.NewRequestWithContext(ctx, "GET", string(url), reader) + task.req, err = http.NewRequestWithContext(ctx, "GET", string(url), reader) for err == nil { var h []byte if h, _, err = reader.ReadLine(); len(h) > 0 { if b, a, f := strings.Cut(string(h), ": "); f { - req.Header.Set(b, a) + task.req.Header.Set(b, a) } } else { break } } - - if err == nil { - h := cfg.GetGlobalCommonConf().GetHandler() - if req.Header.Get("Accept") == "text/event-stream" { - go h.ServeHTTP(wr, req) - } else if req.Header.Get("Upgrade") == "websocket" { - var writer myResponseWriter3 - writer.Stream = s - writer.Connection = conn - req.Host = req.Header.Get("Host") - if req.Host == "" { - req.Host = req.URL.Host - } - if req.Host == "" { - req.Host = "m7s.live" - } - h.ServeHTTP(&writer, req) //建立websocket连接,握手 - } else { - method := req.Header.Get("M7s-Method") - if method == "POST" { - req.Method = "POST" - } - h.ServeHTTP(wr, req) - } - } - io.ReadAll(s) } - if err != nil { - cfg.Error("read console server", "err", err) - } - return err + return +} + +func (task *ReceiveRequestTask) Run() (err error) { + wr := &myResponseWriter2{Stream: task.stream} + req := task.req + if req.Header.Get("Accept") == "text/event-stream" { + go task.handler.ServeHTTP(wr, req) + } else if req.Header.Get("Upgrade") == "websocket" { + var writer myResponseWriter3 + writer.Stream = task.stream + writer.Connection = task.conn + req.Host = req.Header.Get("Host") + if req.Host == "" { + req.Host = req.URL.Host + } + if req.Host == "" { + req.Host = "m7s.live" + } + task.handler.ServeHTTP(&writer, req) //建立websocket连接,握手 + } else { + method := req.Header.Get("M7s-Method") + if method == "POST" { + req.Method = "POST" + } + task.handler.ServeHTTP(wr, req) + } + _, err = io.ReadAll(task.stream) + return +} + +func (task *ReceiveRequestTask) Dispose() { + task.stream.Close() +} + +func (cfg *ConsolePlugin) OnInit() error { + if cfg.Secret == "" || cfg.Server == "" { + return nil + } + connectTask := ConnectServerTask{ + cfg: cfg, + } + connectTask.SetRetry(-1, time.Second) + cfg.AddTask(&connectTask) + return nil } diff --git a/plugin/flv/pkg/record.go b/plugin/flv/pkg/record.go index e50f9a4..d787f89 100644 --- a/plugin/flv/pkg/record.go +++ b/plugin/flv/pkg/record.go @@ -16,7 +16,6 @@ import ( var writeMetaTagQueueTask util.MarcoLongTask func init() { - writeMetaTagQueueTask.Name = "writeMetaTagQueue" util.RootTask.AddTask(&writeMetaTagQueueTask) } diff --git a/plugin/flv/pkg/vod.go b/plugin/flv/pkg/vod.go new file mode 100644 index 0000000..7c6558a --- /dev/null +++ b/plugin/flv/pkg/vod.go @@ -0,0 +1,11 @@ +package flv + +import "m7s.live/m7s/v5/pkg/util" + +type Vod struct { + util.Task +} + +func (v *Vod) Start() error { + return nil +} diff --git a/plugin/gb28181/device.go b/plugin/gb28181/device.go index 45101e7..8974c9e 100644 --- a/plugin/gb28181/device.go +++ b/plugin/gb28181/device.go @@ -3,7 +3,6 @@ package plugin_gb28181 import ( "github.com/emiago/sipgo" "github.com/emiago/sipgo/sip" - "log/slog" "m7s.live/m7s/v5" "m7s.live/m7s/v5/pkg/util" gb28181 "m7s.live/m7s/v5/plugin/gb28181/pkg" @@ -44,7 +43,7 @@ type Device struct { dialogClient *sipgo.DialogClient contactHDR sip.ContactHeader fromHDR sip.FromHeader - *slog.Logger + devices *util.Collection[string, *Device] } func (d *Device) GetKey() string { @@ -94,12 +93,7 @@ func (d *Device) send(req *sip.Request) (*sip.Response, error) { return d.client.Do(d, req) } -func (d *Device) eventLoop(gb *GB28181Plugin) { - defer func() { - d.Status = DeviceOfflineStatus - if gb.devices.RemoveByKey(d.ID) { - } - }() +func (d *Device) Run() { response, err := d.catalog() if err != nil { d.Error("catalog", "err", err) @@ -126,7 +120,7 @@ func (d *Device) eventLoop(gb *GB28181Plugin) { } else { d.Debug("subCatalog", "response", response.String()) } - response, err = d.subscribePosition(int(gb.Position.Interval / time.Second)) + response, err = d.subscribePosition(int(6)) if err != nil { d.Error("subPosition", "err", err) } else { @@ -154,7 +148,7 @@ func (d *Device) eventLoop(gb *GB28181Plugin) { //如果父ID并非本身所属设备,一般情况下这是因为下级设备上传了目录信息,该信息通常不需要处理。 // 暂时不考虑级联目录的实现 if d.ID != parentId { - if parent, ok := gb.devices.Get(parentId); ok { + if parent, ok := d.devices.Get(parentId); ok { parent.addOrUpdateChannel(c) continue } else { diff --git a/plugin/gb28181/index.go b/plugin/gb28181/index.go index e9fa853..3b5045e 100644 --- a/plugin/gb28181/index.go +++ b/plugin/gb28181/index.go @@ -267,18 +267,27 @@ func (gb *GB28181Plugin) StoreDevice(id string, req *sip.Request) (d *Device) { }, Params: sip.NewParams(), }, + devices: &gb.devices, } - gb.With(d, "id", id) + d.Logger = gb.With("id", id) d.fromHDR.Params.Add("tag", sip.GenerateTagN(16)) d.client, _ = sipgo.NewClient(gb.ua, sipgo.WithClientLogger(zerolog.New(os.Stdout)), sipgo.WithClientHostname(publicIP)) d.dialogClient = sipgo.NewDialogClient(d.client, d.contactHDR) d.channels.L = new(sync.RWMutex) d.Info("StoreDevice", "source", source, "desc", desc, "servIp", servIp, "publicIP", publicIP, "recipient", req.Recipient) - gb.devices.Add(d) + if gb.DB != nil { //TODO } - go d.eventLoop(gb) + task := gb.AddTask(d) + task.OnStart(func() { + gb.devices.Add(d) + }) + task.OnDispose(func() { + d.Status = DeviceOfflineStatus + if gb.devices.RemoveByKey(d.ID) { + } + }) return } diff --git a/plugin/rtmp/index.go b/plugin/rtmp/index.go index 583d9bd..82ba0b4 100644 --- a/plugin/rtmp/index.go +++ b/plugin/rtmp/index.go @@ -147,7 +147,6 @@ func (p *RTMPPlugin) OnTCPConnect(conn *net.TCPConn) { } var publisher *m7s.Publisher publisher, err = p.Publish(nc.Context, nc.AppName+"/"+cmd.PublishingName) - publisher.Description = nc.Description if err != nil { err = ns.Response(cmd.TransactionId, NetStream_Publish_BadName, Level_Error) } else { @@ -170,7 +169,6 @@ func (p *RTMPPlugin) OnTCPConnect(conn *net.TCPConn) { var suber *m7s.Subscriber // sender.ID = fmt.Sprintf("%s|%d", conn.RemoteAddr().String(), sender.StreamID) suber, err = p.Subscribe(nc.Context, streamPath) - suber.Description = nc.Description if err != nil { err = ns.Response(cmd.TransactionId, NetStream_Play_Failed, Level_Error) } else { diff --git a/plugin/rtmp/pkg/net-connection.go b/plugin/rtmp/pkg/net-connection.go index 2e583c7..556fe40 100644 --- a/plugin/rtmp/pkg/net-connection.go +++ b/plugin/rtmp/pkg/net-connection.go @@ -72,7 +72,6 @@ func NewNetConnection(conn net.Conn) (ret *NetConnection) { chunkHeaderBuf: make(util.Buffer, 0, 20), Receivers: make(map[uint32]*m7s.Publisher), } - ret.Name = "NetConnection" ret.mediaDataPool.SetAllocator(util.NewScalableMemoryAllocator(1 << util.MinPowerOf2)) return } diff --git a/publisher.go b/publisher.go index 084651d..f4d305b 100644 --- a/publisher.go +++ b/publisher.go @@ -135,7 +135,6 @@ func (p *Publisher) GetKey() string { func createPublisher(p *Plugin, streamPath string, conf config.Publish) (publisher *Publisher) { publisher = &Publisher{Publish: conf} publisher.ID = util.GetNextTaskID() - publisher.Name = "publisher" publisher.Plugin = p publisher.TimeoutTimer = time.NewTimer(p.config.PublishTimeout) publisher.Logger = p.Logger.With("streamPath", streamPath, "pId", publisher.ID) diff --git a/puller.go b/puller.go index 3a1c433..c2d0861 100644 --- a/puller.go +++ b/puller.go @@ -4,6 +4,7 @@ import ( "m7s.live/m7s/v5/pkg" "m7s.live/m7s/v5/pkg/config" "m7s.live/m7s/v5/pkg/util" + "time" ) type Connection struct { @@ -23,7 +24,6 @@ func createPullContext(p *Plugin, streamPath string, url string) (pullCtx *PullC Pull: p.config.Pull, publishConfig: &publishConfig, } - pullCtx.Name = "pull" pullCtx.Plugin = p pullCtx.ConnectProxy = p.config.Pull.Proxy pullCtx.RemoteURL = url @@ -44,25 +44,23 @@ func (p *PullContext) GetKey() string { } type PullSubTask struct { - util.RetryTask + util.Task ctx *PullContext Puller } func (p *PullSubTask) Start() (err error) { - p.MaxRetry = p.ctx.RePull if p.ctx.Publisher, err = p.ctx.Plugin.PublishWithConfig(p.Context, p.ctx.StreamPath, *p.ctx.publishConfig); err != nil { p.Error("pull publish failed", "error", err) return } - p.ctx.Publisher.OnDispose(func() { - p.Stop(p.ctx.Publisher.StopReason()) - }) return p.Puller(p.ctx) } func (p *PullContext) Do(puller Puller) { - p.AddTask(&PullSubTask{ctx: p, Puller: puller}) + task := &PullSubTask{ctx: p, Puller: puller} + task.SetRetry(p.RePull, time.Second*5) + p.AddTask(task) } func (p *PullContext) Start() (err error) { diff --git a/pusher.go b/pusher.go index 1a3b0fb..10f59e3 100644 --- a/pusher.go +++ b/pusher.go @@ -3,6 +3,7 @@ package m7s import ( "m7s.live/m7s/v5/pkg" "m7s.live/m7s/v5/pkg/util" + "time" "m7s.live/m7s/v5/pkg/config" ) @@ -11,7 +12,6 @@ type Pusher = func(*PushContext) error func createPushContext(p *Plugin, streamPath string, url string) (pushCtx *PushContext) { pushCtx = &PushContext{Push: p.config.Push} - pushCtx.Name = "push" pushCtx.Plugin = p pushCtx.RemoteURL = url pushCtx.StreamPath = streamPath @@ -31,13 +31,12 @@ func (p *PushContext) GetKey() string { } type PushSubTask struct { - util.RetryTask + util.Task ctx *PushContext Pusher } func (p *PushSubTask) Start() (err error) { - p.MaxRetry = p.ctx.RePush if p.ctx.Subscriber, err = p.ctx.Plugin.Subscribe(p.Context, p.ctx.StreamPath); err != nil { p.Error("push subscribe failed", "error", err) return @@ -46,7 +45,9 @@ func (p *PushSubTask) Start() (err error) { } func (p *PushContext) Do(pusher Pusher) { - p.AddTask(&PushSubTask{ctx: p, Pusher: pusher}) + task := &PushSubTask{ctx: p, Pusher: pusher} + task.SetRetry(p.RePush, time.Second*5) + p.AddTask(task) } func (p *PushContext) Start() (err error) { diff --git a/recoder.go b/recoder.go index 9b104c5..ecd3163 100644 --- a/recoder.go +++ b/recoder.go @@ -1,7 +1,6 @@ package m7s import ( - "fmt" "m7s.live/m7s/v5/pkg/util" "os" "path/filepath" @@ -20,7 +19,6 @@ func createRecoder(p *Plugin, streamPath string, filePath string) (recorder *Rec FilePath: filePath, StreamPath: streamPath, } - recorder.Name = "record" recorder.Logger = p.Logger.With("filePath", filePath, "streamPath", streamPath) return } @@ -54,7 +52,9 @@ func (r *recordSubTask) Start() (err error) { } dir = filepath.Dir(p.FilePath) } - r.Name = fmt.Sprintf("record:%s", p.FilePath) + r.Description = map[string]any{ + "filePath": p.FilePath, + } if err = os.MkdirAll(dir, 0755); err != nil { return } diff --git a/server.go b/server.go index 1ad07d6..7ff1525 100644 --- a/server.go +++ b/server.go @@ -27,12 +27,11 @@ import ( ) var ( - Version = "v5.0.0" - MergeConfigs = []string{"Publish", "Subscribe", "HTTP", "PublicIP", "LogLevel", "EnableAuth", "DB"} - ExecPath = os.Args[0] - ExecDir = filepath.Dir(ExecPath) - DefaultServer = NewServer() - serverMeta = PluginMeta{ + Version = "v5.0.0" + MergeConfigs = []string{"Publish", "Subscribe", "HTTP", "PublicIP", "LogLevel", "EnableAuth", "DB"} + ExecPath = os.Args[0] + ExecDir = filepath.Dir(ExecPath) + serverMeta = PluginMeta{ Name: "Global", Version: Version, } @@ -82,15 +81,17 @@ type Server struct { conf any } -func NewServer() (s *Server) { - s = &Server{} +func NewServer(conf any) (s *Server) { + s = &Server{ + conf: conf, + } s.ID = util.GetNextTaskID() s.Meta = &serverMeta return } func Run(ctx context.Context, conf any) error { - return DefaultServer.Run(ctx, conf) + return util.RootTask.AddTaskWithContext(ctx, NewServer(conf)).WaitStopped() } type rawconfig = map[string]map[string]any @@ -122,9 +123,7 @@ func (s *Server) GetKey() uint32 { return s.ID } -func (s *Server) Init(conf any) { - s.Name = "server" - s.conf = conf +func (s *Server) Start() (err error) { s.Server = s s.handler = s s.config.HTTP.ListenAddrTLS = ":8443" @@ -133,13 +132,6 @@ func (s *Server) Init(conf any) { s.LogHandler.SetLevel(slog.LevelDebug) s.LogHandler.Add(defaultLogHandler) s.Logger = slog.New(&s.LogHandler).With("server", s.ID) - s.streamTask.Name = "stream" - s.pullTask.Name = "pull" - s.pushTask.Name = "push" - s.recordTask.Name = "record" -} - -func (s *Server) Start() (err error) { httpConf, tcpConf := &s.config.HTTP, &s.config.TCP mux := runtime.NewServeMux(runtime.WithMarshalerOption("text/plain", &pb.TextPlain{}), runtime.WithRoutingErrorHandler(func(_ context.Context, _ *runtime.ServeMux, _ runtime.Marshaler, w http.ResponseWriter, r *http.Request, _ int) { httpConf.GetHttpMux().ServeHTTP(w, r) @@ -267,24 +259,15 @@ func (s *Server) Dispose() { _ = s.tcplis.Close() _ = s.grpcClientConn.Close() s.config.HTTP.StopListen() -} - -func (s *Server) Run(ctx context.Context, conf any) (err error) { - for { - s.Init(conf) - util.RootTask.AddTaskWithContext(ctx, s) - if err = s.WaitStarted(); err != nil { - return - } - if err = s.WaitStopped(); err != ErrRestart { - s.Info("server stopped", "error", err) - return - } + if err := s.StopReason(); err == ErrRestart { var server Server server.ID = s.ID server.Meta = s.Meta server.DB = s.DB *s = server + util.RootTask.AddTask(s) + } else { + s.Info("server stopped", "err", err) } } diff --git a/subscriber.go b/subscriber.go index bfd566e..8bf10c8 100644 --- a/subscriber.go +++ b/subscriber.go @@ -2,7 +2,6 @@ package m7s import ( "errors" - "fmt" "net/url" "reflect" "runtime" @@ -28,6 +27,11 @@ func (ps *PubSubBase) Init(streamPath string, conf any) { if u, err := url.Parse(streamPath); err == nil { ps.StreamPath, ps.Args = u.Path, u.Query() } + ps.Description = map[string]any{ + "streamPath": ps.StreamPath, + "args": ps.Args, + "plugin": ps.Plugin.Meta.Name, + } // args to config if len(ps.Args) != 0 { var c config.Config @@ -60,7 +64,6 @@ type Subscriber struct { func createSubscriber(p *Plugin, streamPath string, conf config.Subscribe) *Subscriber { subscriber := &Subscriber{Subscribe: conf} subscriber.ID = util.GetNextTaskID() - subscriber.Name = "subscriber" subscriber.Plugin = p subscriber.TimeoutTimer = time.NewTimer(subscriber.WaitTimeout) subscriber.Logger = p.Logger.With("streamPath", streamPath, "sId", subscriber.ID) @@ -166,7 +169,6 @@ type SubscribeHandler[A any, V any] struct { func CreatePlayTask[A any, V any](s *Subscriber, onAudio func(A) error, onVideo func(V) error) util.ITask { var handler SubscribeHandler[A, V] - handler.Name = fmt.Sprintf("play:%s", s.StreamPath) handler.s = s handler.OnAudio = onAudio handler.OnVideo = onVideo