feat: use GrantedRegion instead of region_ids (#117)
This commit is contained in:
+178
-100
@@ -347,20 +347,75 @@ func (x *HeartbeatResponse) GetRegionLease() *RegionLease {
|
||||
return nil
|
||||
}
|
||||
|
||||
type GrantedRegion struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RegionId uint64 `protobuf:"varint,1,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
|
||||
Role RegionRole `protobuf:"varint,2,opt,name=role,proto3,enum=greptime.v1.meta.RegionRole" json:"role,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GrantedRegion) Reset() {
|
||||
*x = GrantedRegion{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GrantedRegion) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GrantedRegion) ProtoMessage() {}
|
||||
|
||||
func (x *GrantedRegion) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[3]
|
||||
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 GrantedRegion.ProtoReflect.Descriptor instead.
|
||||
func (*GrantedRegion) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *GrantedRegion) GetRegionId() uint64 {
|
||||
if x != nil {
|
||||
return x.RegionId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GrantedRegion) GetRole() RegionRole {
|
||||
if x != nil {
|
||||
return x.Role
|
||||
}
|
||||
return RegionRole_Leader
|
||||
}
|
||||
|
||||
type RegionLease struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RegionIds []uint64 `protobuf:"varint,1,rep,packed,name=region_ids,json=regionIds,proto3" json:"region_ids,omitempty"`
|
||||
DurationSinceEpoch uint64 `protobuf:"varint,2,opt,name=duration_since_epoch,json=durationSinceEpoch,proto3" json:"duration_since_epoch,omitempty"`
|
||||
LeaseSeconds uint64 `protobuf:"varint,3,opt,name=lease_seconds,json=leaseSeconds,proto3" json:"lease_seconds,omitempty"`
|
||||
Regions []*GrantedRegion `protobuf:"bytes,1,rep,name=regions,proto3" json:"regions,omitempty"`
|
||||
DurationSinceEpoch uint64 `protobuf:"varint,2,opt,name=duration_since_epoch,json=durationSinceEpoch,proto3" json:"duration_since_epoch,omitempty"`
|
||||
LeaseSeconds uint64 `protobuf:"varint,3,opt,name=lease_seconds,json=leaseSeconds,proto3" json:"lease_seconds,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RegionLease) Reset() {
|
||||
*x = RegionLease{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[3]
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -373,7 +428,7 @@ func (x *RegionLease) String() string {
|
||||
func (*RegionLease) ProtoMessage() {}
|
||||
|
||||
func (x *RegionLease) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[3]
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -386,12 +441,12 @@ func (x *RegionLease) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use RegionLease.ProtoReflect.Descriptor instead.
|
||||
func (*RegionLease) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{3}
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *RegionLease) GetRegionIds() []uint64 {
|
||||
func (x *RegionLease) GetRegions() []*GrantedRegion {
|
||||
if x != nil {
|
||||
return x.RegionIds
|
||||
return x.Regions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -421,7 +476,7 @@ type AskLeaderRequest struct {
|
||||
func (x *AskLeaderRequest) Reset() {
|
||||
*x = AskLeaderRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[4]
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -434,7 +489,7 @@ func (x *AskLeaderRequest) String() string {
|
||||
func (*AskLeaderRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AskLeaderRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[4]
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -447,7 +502,7 @@ func (x *AskLeaderRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AskLeaderRequest.ProtoReflect.Descriptor instead.
|
||||
func (*AskLeaderRequest) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{4}
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *AskLeaderRequest) GetHeader() *RequestHeader {
|
||||
@@ -469,7 +524,7 @@ type AskLeaderResponse struct {
|
||||
func (x *AskLeaderResponse) Reset() {
|
||||
*x = AskLeaderResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[5]
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -482,7 +537,7 @@ func (x *AskLeaderResponse) String() string {
|
||||
func (*AskLeaderResponse) ProtoMessage() {}
|
||||
|
||||
func (x *AskLeaderResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[5]
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -495,7 +550,7 @@ func (x *AskLeaderResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AskLeaderResponse.ProtoReflect.Descriptor instead.
|
||||
func (*AskLeaderResponse) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{5}
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *AskLeaderResponse) GetHeader() *ResponseHeader {
|
||||
@@ -537,7 +592,7 @@ type MailboxMessage struct {
|
||||
func (x *MailboxMessage) Reset() {
|
||||
*x = MailboxMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[6]
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -550,7 +605,7 @@ func (x *MailboxMessage) String() string {
|
||||
func (*MailboxMessage) ProtoMessage() {}
|
||||
|
||||
func (x *MailboxMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[6]
|
||||
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -563,7 +618,7 @@ func (x *MailboxMessage) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use MailboxMessage.ProtoReflect.Descriptor instead.
|
||||
func (*MailboxMessage) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{6}
|
||||
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *MailboxMessage) GetId() uint64 {
|
||||
@@ -688,58 +743,66 @@ var file_greptime_v1_meta_heartbeat_proto_rawDesc = []byte{
|
||||
0x65, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65,
|
||||
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x6f,
|
||||
0x6e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x67, 0x69, 0x6f,
|
||||
0x6e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x09, 0x72, 0x65, 0x67, 0x69,
|
||||
0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x04, 0x52, 0x12, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x6e,
|
||||
0x63, 0x65, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x65,
|
||||
0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c,
|
||||
0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x4b, 0x0a, 0x10,
|
||||
0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x7d, 0x0a, 0x11, 0x41, 0x73, 0x6b,
|
||||
0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38,
|
||||
0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20,
|
||||
0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74,
|
||||
0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||
0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72,
|
||||
0x52, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xaa, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x69,
|
||||
0x6c, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73,
|
||||
0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75,
|
||||
0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69,
|
||||
0x6c, 0x6c, 0x69, 0x73, 0x12, 0x14, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61,
|
||||
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x26, 0x0a, 0x0a, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x6f, 0x6c, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x00, 0x12,
|
||||
0x0c, 0x0a, 0x08, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x10, 0x01, 0x32, 0xbf, 0x01,
|
||||
0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x48,
|
||||
0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72,
|
||||
0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67,
|
||||
0x6e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x5e, 0x0a, 0x0d, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65,
|
||||
0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f,
|
||||
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69,
|
||||
0x6f, 0x6e, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65,
|
||||
0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x67, 0x69, 0x6f,
|
||||
0x6e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74,
|
||||
0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69,
|
||||
0x6e, 0x63, 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52,
|
||||
0x12, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x45, 0x70,
|
||||
0x6f, 0x63, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x63,
|
||||
0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x73,
|
||||
0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x4b, 0x0a, 0x10, 0x41, 0x73, 0x6b, 0x4c,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06,
|
||||
0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
|
||||
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e,
|
||||
0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x09, 0x41, 0x73, 0x6b, 0x4c, 0x65,
|
||||
0x61, 0x64, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x7d, 0x0a, 0x11, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65,
|
||||
0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65,
|
||||
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65,
|
||||
0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x06, 0x6c, 0x65,
|
||||
0x61, 0x64, 0x65, 0x72, 0x22, 0xaa, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x69, 0x6c, 0x62, 0x6f, 0x78,
|
||||
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65,
|
||||
0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63,
|
||||
0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
||||
0x6d, 0x70, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73,
|
||||
0x12, 0x14, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
|
||||
0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61,
|
||||
0x64, 0x2a, 0x26, 0x0a, 0x0a, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x12,
|
||||
0x0a, 0x0a, 0x06, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46,
|
||||
0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x10, 0x01, 0x32, 0xbf, 0x01, 0x0a, 0x09, 0x48, 0x65,
|
||||
0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74,
|
||||
0x62, 0x65, 0x61, 0x74, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61,
|
||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72,
|
||||
0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28,
|
||||
0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x09, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||
0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
|
||||
0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72,
|
||||
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65,
|
||||
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -755,43 +818,46 @@ func file_greptime_v1_meta_heartbeat_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_greptime_v1_meta_heartbeat_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_greptime_v1_meta_heartbeat_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_greptime_v1_meta_heartbeat_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_greptime_v1_meta_heartbeat_proto_goTypes = []interface{}{
|
||||
(RegionRole)(0), // 0: greptime.v1.meta.RegionRole
|
||||
(*HeartbeatRequest)(nil), // 1: greptime.v1.meta.HeartbeatRequest
|
||||
(*RegionStat)(nil), // 2: greptime.v1.meta.RegionStat
|
||||
(*HeartbeatResponse)(nil), // 3: greptime.v1.meta.HeartbeatResponse
|
||||
(*RegionLease)(nil), // 4: greptime.v1.meta.RegionLease
|
||||
(*AskLeaderRequest)(nil), // 5: greptime.v1.meta.AskLeaderRequest
|
||||
(*AskLeaderResponse)(nil), // 6: greptime.v1.meta.AskLeaderResponse
|
||||
(*MailboxMessage)(nil), // 7: greptime.v1.meta.MailboxMessage
|
||||
(*RequestHeader)(nil), // 8: greptime.v1.meta.RequestHeader
|
||||
(*Peer)(nil), // 9: greptime.v1.meta.Peer
|
||||
(*TimeInterval)(nil), // 10: greptime.v1.meta.TimeInterval
|
||||
(*ResponseHeader)(nil), // 11: greptime.v1.meta.ResponseHeader
|
||||
(*GrantedRegion)(nil), // 4: greptime.v1.meta.GrantedRegion
|
||||
(*RegionLease)(nil), // 5: greptime.v1.meta.RegionLease
|
||||
(*AskLeaderRequest)(nil), // 6: greptime.v1.meta.AskLeaderRequest
|
||||
(*AskLeaderResponse)(nil), // 7: greptime.v1.meta.AskLeaderResponse
|
||||
(*MailboxMessage)(nil), // 8: greptime.v1.meta.MailboxMessage
|
||||
(*RequestHeader)(nil), // 9: greptime.v1.meta.RequestHeader
|
||||
(*Peer)(nil), // 10: greptime.v1.meta.Peer
|
||||
(*TimeInterval)(nil), // 11: greptime.v1.meta.TimeInterval
|
||||
(*ResponseHeader)(nil), // 12: greptime.v1.meta.ResponseHeader
|
||||
}
|
||||
var file_greptime_v1_meta_heartbeat_proto_depIdxs = []int32{
|
||||
8, // 0: greptime.v1.meta.HeartbeatRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
9, // 1: greptime.v1.meta.HeartbeatRequest.peer:type_name -> greptime.v1.meta.Peer
|
||||
10, // 2: greptime.v1.meta.HeartbeatRequest.report_interval:type_name -> greptime.v1.meta.TimeInterval
|
||||
9, // 0: greptime.v1.meta.HeartbeatRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
10, // 1: greptime.v1.meta.HeartbeatRequest.peer:type_name -> greptime.v1.meta.Peer
|
||||
11, // 2: greptime.v1.meta.HeartbeatRequest.report_interval:type_name -> greptime.v1.meta.TimeInterval
|
||||
2, // 3: greptime.v1.meta.HeartbeatRequest.region_stats:type_name -> greptime.v1.meta.RegionStat
|
||||
7, // 4: greptime.v1.meta.HeartbeatRequest.mailbox_message:type_name -> greptime.v1.meta.MailboxMessage
|
||||
8, // 4: greptime.v1.meta.HeartbeatRequest.mailbox_message:type_name -> greptime.v1.meta.MailboxMessage
|
||||
0, // 5: greptime.v1.meta.RegionStat.role:type_name -> greptime.v1.meta.RegionRole
|
||||
11, // 6: greptime.v1.meta.HeartbeatResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
7, // 7: greptime.v1.meta.HeartbeatResponse.mailbox_message:type_name -> greptime.v1.meta.MailboxMessage
|
||||
4, // 8: greptime.v1.meta.HeartbeatResponse.region_lease:type_name -> greptime.v1.meta.RegionLease
|
||||
8, // 9: greptime.v1.meta.AskLeaderRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
11, // 10: greptime.v1.meta.AskLeaderResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
9, // 11: greptime.v1.meta.AskLeaderResponse.leader:type_name -> greptime.v1.meta.Peer
|
||||
1, // 12: greptime.v1.meta.Heartbeat.Heartbeat:input_type -> greptime.v1.meta.HeartbeatRequest
|
||||
5, // 13: greptime.v1.meta.Heartbeat.AskLeader:input_type -> greptime.v1.meta.AskLeaderRequest
|
||||
3, // 14: greptime.v1.meta.Heartbeat.Heartbeat:output_type -> greptime.v1.meta.HeartbeatResponse
|
||||
6, // 15: greptime.v1.meta.Heartbeat.AskLeader:output_type -> greptime.v1.meta.AskLeaderResponse
|
||||
14, // [14:16] is the sub-list for method output_type
|
||||
12, // [12:14] is the sub-list for method input_type
|
||||
12, // [12:12] is the sub-list for extension type_name
|
||||
12, // [12:12] is the sub-list for extension extendee
|
||||
0, // [0:12] is the sub-list for field type_name
|
||||
12, // 6: greptime.v1.meta.HeartbeatResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
8, // 7: greptime.v1.meta.HeartbeatResponse.mailbox_message:type_name -> greptime.v1.meta.MailboxMessage
|
||||
5, // 8: greptime.v1.meta.HeartbeatResponse.region_lease:type_name -> greptime.v1.meta.RegionLease
|
||||
0, // 9: greptime.v1.meta.GrantedRegion.role:type_name -> greptime.v1.meta.RegionRole
|
||||
4, // 10: greptime.v1.meta.RegionLease.regions:type_name -> greptime.v1.meta.GrantedRegion
|
||||
9, // 11: greptime.v1.meta.AskLeaderRequest.header:type_name -> greptime.v1.meta.RequestHeader
|
||||
12, // 12: greptime.v1.meta.AskLeaderResponse.header:type_name -> greptime.v1.meta.ResponseHeader
|
||||
10, // 13: greptime.v1.meta.AskLeaderResponse.leader:type_name -> greptime.v1.meta.Peer
|
||||
1, // 14: greptime.v1.meta.Heartbeat.Heartbeat:input_type -> greptime.v1.meta.HeartbeatRequest
|
||||
6, // 15: greptime.v1.meta.Heartbeat.AskLeader:input_type -> greptime.v1.meta.AskLeaderRequest
|
||||
3, // 16: greptime.v1.meta.Heartbeat.Heartbeat:output_type -> greptime.v1.meta.HeartbeatResponse
|
||||
7, // 17: greptime.v1.meta.Heartbeat.AskLeader:output_type -> greptime.v1.meta.AskLeaderResponse
|
||||
16, // [16:18] is the sub-list for method output_type
|
||||
14, // [14:16] is the sub-list for method input_type
|
||||
14, // [14:14] is the sub-list for extension type_name
|
||||
14, // [14:14] is the sub-list for extension extendee
|
||||
0, // [0:14] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_greptime_v1_meta_heartbeat_proto_init() }
|
||||
@@ -838,7 +904,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() {
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RegionLease); i {
|
||||
switch v := v.(*GrantedRegion); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@@ -850,7 +916,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() {
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AskLeaderRequest); i {
|
||||
switch v := v.(*RegionLease); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@@ -862,7 +928,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() {
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AskLeaderResponse); i {
|
||||
switch v := v.(*AskLeaderRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@@ -874,6 +940,18 @@ func file_greptime_v1_meta_heartbeat_proto_init() {
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AskLeaderResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MailboxMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -886,7 +964,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() {
|
||||
}
|
||||
}
|
||||
}
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[6].OneofWrappers = []interface{}{
|
||||
file_greptime_v1_meta_heartbeat_proto_msgTypes[7].OneofWrappers = []interface{}{
|
||||
(*MailboxMessage_Json)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
@@ -895,7 +973,7 @@ func file_greptime_v1_meta_heartbeat_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_greptime_v1_meta_heartbeat_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 7,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user