From 9a571718f5d6bd82768d43ea8160ae057a7c0e43 Mon Sep 17 00:00:00 2001 From: snower Date: Fri, 11 Nov 2022 10:50:39 +0800 Subject: [PATCH] optimization arbiter poll member status --- protocol/protobuf/arbiter.pb.go | 556 +++++++++++++++++++++----------- protocol/protobuf/arbiter.proto | 27 +- server/arbiter.go | 44 ++- 3 files changed, 424 insertions(+), 203 deletions(-) diff --git a/protocol/protobuf/arbiter.pb.go b/protocol/protobuf/arbiter.pb.go index 4ee8118..93ca55b 100644 --- a/protocol/protobuf/arbiter.pb.go +++ b/protocol/protobuf/arbiter.pb.go @@ -860,6 +860,141 @@ func (x *ArbiterStatusResponse) GetRole() uint32 { return 0 } +type ArbiterMemberStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` + Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` + Arbiter uint32 `protobuf:"varint,3,opt,name=arbiter,proto3" json:"arbiter,omitempty"` + Role uint32 `protobuf:"varint,4,opt,name=role,proto3" json:"role,omitempty"` + Status uint32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` + LastUpdated int64 `protobuf:"varint,6,opt,name=lastUpdated,proto3" json:"lastUpdated,omitempty"` + LastDelay int64 `protobuf:"varint,7,opt,name=lastDelay,proto3" json:"lastDelay,omitempty"` + LastError int32 `protobuf:"varint,8,opt,name=lastError,proto3" json:"lastError,omitempty"` + AofId []byte `protobuf:"bytes,9,opt,name=aofId,proto3" json:"aofId,omitempty"` + IsSelf bool `protobuf:"varint,10,opt,name=isSelf,proto3" json:"isSelf,omitempty"` + Abstianed bool `protobuf:"varint,11,opt,name=abstianed,proto3" json:"abstianed,omitempty"` + Closed bool `protobuf:"varint,12,opt,name=closed,proto3" json:"closed,omitempty"` +} + +func (x *ArbiterMemberStatus) Reset() { + *x = ArbiterMemberStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_arbiter_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArbiterMemberStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArbiterMemberStatus) ProtoMessage() {} + +func (x *ArbiterMemberStatus) ProtoReflect() protoreflect.Message { + mi := &file_arbiter_proto_msgTypes[14] + 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 ArbiterMemberStatus.ProtoReflect.Descriptor instead. +func (*ArbiterMemberStatus) Descriptor() ([]byte, []int) { + return file_arbiter_proto_rawDescGZIP(), []int{14} +} + +func (x *ArbiterMemberStatus) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +func (x *ArbiterMemberStatus) GetWeight() uint32 { + if x != nil { + return x.Weight + } + return 0 +} + +func (x *ArbiterMemberStatus) GetArbiter() uint32 { + if x != nil { + return x.Arbiter + } + return 0 +} + +func (x *ArbiterMemberStatus) GetRole() uint32 { + if x != nil { + return x.Role + } + return 0 +} + +func (x *ArbiterMemberStatus) GetStatus() uint32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *ArbiterMemberStatus) GetLastUpdated() int64 { + if x != nil { + return x.LastUpdated + } + return 0 +} + +func (x *ArbiterMemberStatus) GetLastDelay() int64 { + if x != nil { + return x.LastDelay + } + return 0 +} + +func (x *ArbiterMemberStatus) GetLastError() int32 { + if x != nil { + return x.LastError + } + return 0 +} + +func (x *ArbiterMemberStatus) GetAofId() []byte { + if x != nil { + return x.AofId + } + return nil +} + +func (x *ArbiterMemberStatus) GetIsSelf() bool { + if x != nil { + return x.IsSelf + } + return false +} + +func (x *ArbiterMemberStatus) GetAbstianed() bool { + if x != nil { + return x.Abstianed + } + return false +} + +func (x *ArbiterMemberStatus) GetClosed() bool { + if x != nil { + return x.Closed + } + return false +} + type ArbiterConfigRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -873,7 +1008,7 @@ type ArbiterConfigRequest struct { func (x *ArbiterConfigRequest) Reset() { *x = ArbiterConfigRequest{} if protoimpl.UnsafeEnabled { - mi := &file_arbiter_proto_msgTypes[14] + mi := &file_arbiter_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -886,7 +1021,7 @@ func (x *ArbiterConfigRequest) String() string { func (*ArbiterConfigRequest) ProtoMessage() {} func (x *ArbiterConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_arbiter_proto_msgTypes[14] + mi := &file_arbiter_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -899,7 +1034,7 @@ func (x *ArbiterConfigRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbiterConfigRequest.ProtoReflect.Descriptor instead. func (*ArbiterConfigRequest) Descriptor() ([]byte, []int) { - return file_arbiter_proto_rawDescGZIP(), []int{14} + return file_arbiter_proto_rawDescGZIP(), []int{15} } func (x *ArbiterConfigRequest) GetHost() string { @@ -928,19 +1063,19 @@ type ArbiterConfigResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` - Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - Vertime uint64 `protobuf:"varint,4,opt,name=vertime,proto3" json:"vertime,omitempty"` - Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` - Members []*ReplSetMember `protobuf:"bytes,6,rep,name=members,proto3" json:"members,omitempty"` - CommitId uint64 `protobuf:"varint,7,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` + Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + Vertime uint64 `protobuf:"varint,4,opt,name=vertime,proto3" json:"vertime,omitempty"` + Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` + Members []*ArbiterMemberStatus `protobuf:"bytes,6,rep,name=members,proto3" json:"members,omitempty"` + CommitId uint64 `protobuf:"varint,7,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` } func (x *ArbiterConfigResponse) Reset() { *x = ArbiterConfigResponse{} if protoimpl.UnsafeEnabled { - mi := &file_arbiter_proto_msgTypes[15] + mi := &file_arbiter_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -953,7 +1088,7 @@ func (x *ArbiterConfigResponse) String() string { func (*ArbiterConfigResponse) ProtoMessage() {} func (x *ArbiterConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_arbiter_proto_msgTypes[15] + mi := &file_arbiter_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -966,7 +1101,7 @@ func (x *ArbiterConfigResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbiterConfigResponse.ProtoReflect.Descriptor instead. func (*ArbiterConfigResponse) Descriptor() ([]byte, []int) { - return file_arbiter_proto_rawDescGZIP(), []int{15} + return file_arbiter_proto_rawDescGZIP(), []int{16} } func (x *ArbiterConfigResponse) GetName() string { @@ -1004,7 +1139,7 @@ func (x *ArbiterConfigResponse) GetOwner() string { return "" } -func (x *ArbiterConfigResponse) GetMembers() []*ReplSetMember { +func (x *ArbiterConfigResponse) GetMembers() []*ArbiterMemberStatus { if x != nil { return x.Members } @@ -1024,12 +1159,14 @@ type ArbiterMemberListRequest struct { unknownFields protoimpl.UnknownFields PollTimeout uint32 `protobuf:"varint,1,opt,name=pollTimeout,proto3" json:"pollTimeout,omitempty"` + Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + Vertime uint64 `protobuf:"varint,3,opt,name=vertime,proto3" json:"vertime,omitempty"` } func (x *ArbiterMemberListRequest) Reset() { *x = ArbiterMemberListRequest{} if protoimpl.UnsafeEnabled { - mi := &file_arbiter_proto_msgTypes[16] + mi := &file_arbiter_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1042,7 +1179,7 @@ func (x *ArbiterMemberListRequest) String() string { func (*ArbiterMemberListRequest) ProtoMessage() {} func (x *ArbiterMemberListRequest) ProtoReflect() protoreflect.Message { - mi := &file_arbiter_proto_msgTypes[16] + mi := &file_arbiter_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1055,7 +1192,7 @@ func (x *ArbiterMemberListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbiterMemberListRequest.ProtoReflect.Descriptor instead. func (*ArbiterMemberListRequest) Descriptor() ([]byte, []int) { - return file_arbiter_proto_rawDescGZIP(), []int{16} + return file_arbiter_proto_rawDescGZIP(), []int{17} } func (x *ArbiterMemberListRequest) GetPollTimeout() uint32 { @@ -1065,24 +1202,38 @@ func (x *ArbiterMemberListRequest) GetPollTimeout() uint32 { return 0 } +func (x *ArbiterMemberListRequest) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *ArbiterMemberListRequest) GetVertime() uint64 { + if x != nil { + return x.Vertime + } + return 0 +} + type ArbiterMemberListResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` - Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - Vertime uint64 `protobuf:"varint,4,opt,name=vertime,proto3" json:"vertime,omitempty"` - Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` - Members []*ReplSetMember `protobuf:"bytes,6,rep,name=members,proto3" json:"members,omitempty"` - CommitId uint64 `protobuf:"varint,7,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` + Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + Vertime uint64 `protobuf:"varint,4,opt,name=vertime,proto3" json:"vertime,omitempty"` + Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` + Members []*ArbiterMemberStatus `protobuf:"bytes,6,rep,name=members,proto3" json:"members,omitempty"` + CommitId uint64 `protobuf:"varint,7,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` } func (x *ArbiterMemberListResponse) Reset() { *x = ArbiterMemberListResponse{} if protoimpl.UnsafeEnabled { - mi := &file_arbiter_proto_msgTypes[17] + mi := &file_arbiter_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1095,7 +1246,7 @@ func (x *ArbiterMemberListResponse) String() string { func (*ArbiterMemberListResponse) ProtoMessage() {} func (x *ArbiterMemberListResponse) ProtoReflect() protoreflect.Message { - mi := &file_arbiter_proto_msgTypes[17] + mi := &file_arbiter_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1108,7 +1259,7 @@ func (x *ArbiterMemberListResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbiterMemberListResponse.ProtoReflect.Descriptor instead. func (*ArbiterMemberListResponse) Descriptor() ([]byte, []int) { - return file_arbiter_proto_rawDescGZIP(), []int{17} + return file_arbiter_proto_rawDescGZIP(), []int{18} } func (x *ArbiterMemberListResponse) GetName() string { @@ -1146,7 +1297,7 @@ func (x *ArbiterMemberListResponse) GetOwner() string { return "" } -func (x *ArbiterMemberListResponse) GetMembers() []*ReplSetMember { +func (x *ArbiterMemberListResponse) GetMembers() []*ArbiterMemberStatus { if x != nil { return x.Members } @@ -1173,7 +1324,7 @@ type ArbiterMemberAddRequest struct { func (x *ArbiterMemberAddRequest) Reset() { *x = ArbiterMemberAddRequest{} if protoimpl.UnsafeEnabled { - mi := &file_arbiter_proto_msgTypes[18] + mi := &file_arbiter_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1186,7 +1337,7 @@ func (x *ArbiterMemberAddRequest) String() string { func (*ArbiterMemberAddRequest) ProtoMessage() {} func (x *ArbiterMemberAddRequest) ProtoReflect() protoreflect.Message { - mi := &file_arbiter_proto_msgTypes[18] + mi := &file_arbiter_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1199,7 +1350,7 @@ func (x *ArbiterMemberAddRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbiterMemberAddRequest.ProtoReflect.Descriptor instead. func (*ArbiterMemberAddRequest) Descriptor() ([]byte, []int) { - return file_arbiter_proto_rawDescGZIP(), []int{18} + return file_arbiter_proto_rawDescGZIP(), []int{19} } func (x *ArbiterMemberAddRequest) GetHost() string { @@ -1228,19 +1379,19 @@ type ArbiterMemberAddResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` - Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - Vertime uint64 `protobuf:"varint,4,opt,name=vertime,proto3" json:"vertime,omitempty"` - Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` - Members []*ReplSetMember `protobuf:"bytes,6,rep,name=members,proto3" json:"members,omitempty"` - CommitId uint64 `protobuf:"varint,7,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` + Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + Vertime uint64 `protobuf:"varint,4,opt,name=vertime,proto3" json:"vertime,omitempty"` + Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` + Members []*ArbiterMemberStatus `protobuf:"bytes,6,rep,name=members,proto3" json:"members,omitempty"` + CommitId uint64 `protobuf:"varint,7,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` } func (x *ArbiterMemberAddResponse) Reset() { *x = ArbiterMemberAddResponse{} if protoimpl.UnsafeEnabled { - mi := &file_arbiter_proto_msgTypes[19] + mi := &file_arbiter_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1253,7 +1404,7 @@ func (x *ArbiterMemberAddResponse) String() string { func (*ArbiterMemberAddResponse) ProtoMessage() {} func (x *ArbiterMemberAddResponse) ProtoReflect() protoreflect.Message { - mi := &file_arbiter_proto_msgTypes[19] + mi := &file_arbiter_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1266,7 +1417,7 @@ func (x *ArbiterMemberAddResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbiterMemberAddResponse.ProtoReflect.Descriptor instead. func (*ArbiterMemberAddResponse) Descriptor() ([]byte, []int) { - return file_arbiter_proto_rawDescGZIP(), []int{19} + return file_arbiter_proto_rawDescGZIP(), []int{20} } func (x *ArbiterMemberAddResponse) GetName() string { @@ -1304,7 +1455,7 @@ func (x *ArbiterMemberAddResponse) GetOwner() string { return "" } -func (x *ArbiterMemberAddResponse) GetMembers() []*ReplSetMember { +func (x *ArbiterMemberAddResponse) GetMembers() []*ArbiterMemberStatus { if x != nil { return x.Members } @@ -1331,7 +1482,7 @@ type ArbiterMemberUpdateRequest struct { func (x *ArbiterMemberUpdateRequest) Reset() { *x = ArbiterMemberUpdateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_arbiter_proto_msgTypes[20] + mi := &file_arbiter_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1344,7 +1495,7 @@ func (x *ArbiterMemberUpdateRequest) String() string { func (*ArbiterMemberUpdateRequest) ProtoMessage() {} func (x *ArbiterMemberUpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_arbiter_proto_msgTypes[20] + mi := &file_arbiter_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1357,7 +1508,7 @@ func (x *ArbiterMemberUpdateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbiterMemberUpdateRequest.ProtoReflect.Descriptor instead. func (*ArbiterMemberUpdateRequest) Descriptor() ([]byte, []int) { - return file_arbiter_proto_rawDescGZIP(), []int{20} + return file_arbiter_proto_rawDescGZIP(), []int{21} } func (x *ArbiterMemberUpdateRequest) GetHost() string { @@ -1386,19 +1537,19 @@ type ArbiterMemberUpdateResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` - Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - Vertime uint64 `protobuf:"varint,4,opt,name=vertime,proto3" json:"vertime,omitempty"` - Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` - Members []*ReplSetMember `protobuf:"bytes,6,rep,name=members,proto3" json:"members,omitempty"` - CommitId uint64 `protobuf:"varint,7,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` + Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + Vertime uint64 `protobuf:"varint,4,opt,name=vertime,proto3" json:"vertime,omitempty"` + Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` + Members []*ArbiterMemberStatus `protobuf:"bytes,6,rep,name=members,proto3" json:"members,omitempty"` + CommitId uint64 `protobuf:"varint,7,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` } func (x *ArbiterMemberUpdateResponse) Reset() { *x = ArbiterMemberUpdateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_arbiter_proto_msgTypes[21] + mi := &file_arbiter_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1411,7 +1562,7 @@ func (x *ArbiterMemberUpdateResponse) String() string { func (*ArbiterMemberUpdateResponse) ProtoMessage() {} func (x *ArbiterMemberUpdateResponse) ProtoReflect() protoreflect.Message { - mi := &file_arbiter_proto_msgTypes[21] + mi := &file_arbiter_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1424,7 +1575,7 @@ func (x *ArbiterMemberUpdateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbiterMemberUpdateResponse.ProtoReflect.Descriptor instead. func (*ArbiterMemberUpdateResponse) Descriptor() ([]byte, []int) { - return file_arbiter_proto_rawDescGZIP(), []int{21} + return file_arbiter_proto_rawDescGZIP(), []int{22} } func (x *ArbiterMemberUpdateResponse) GetName() string { @@ -1462,7 +1613,7 @@ func (x *ArbiterMemberUpdateResponse) GetOwner() string { return "" } -func (x *ArbiterMemberUpdateResponse) GetMembers() []*ReplSetMember { +func (x *ArbiterMemberUpdateResponse) GetMembers() []*ArbiterMemberStatus { if x != nil { return x.Members } @@ -1487,7 +1638,7 @@ type ArbiterMemberRemoveRequest struct { func (x *ArbiterMemberRemoveRequest) Reset() { *x = ArbiterMemberRemoveRequest{} if protoimpl.UnsafeEnabled { - mi := &file_arbiter_proto_msgTypes[22] + mi := &file_arbiter_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1500,7 +1651,7 @@ func (x *ArbiterMemberRemoveRequest) String() string { func (*ArbiterMemberRemoveRequest) ProtoMessage() {} func (x *ArbiterMemberRemoveRequest) ProtoReflect() protoreflect.Message { - mi := &file_arbiter_proto_msgTypes[22] + mi := &file_arbiter_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1513,7 +1664,7 @@ func (x *ArbiterMemberRemoveRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbiterMemberRemoveRequest.ProtoReflect.Descriptor instead. func (*ArbiterMemberRemoveRequest) Descriptor() ([]byte, []int) { - return file_arbiter_proto_rawDescGZIP(), []int{22} + return file_arbiter_proto_rawDescGZIP(), []int{23} } func (x *ArbiterMemberRemoveRequest) GetHost() string { @@ -1528,19 +1679,19 @@ type ArbiterMemberRemoveResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` - Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - Vertime uint64 `protobuf:"varint,4,opt,name=vertime,proto3" json:"vertime,omitempty"` - Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` - Members []*ReplSetMember `protobuf:"bytes,6,rep,name=members,proto3" json:"members,omitempty"` - CommitId uint64 `protobuf:"varint,7,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` + Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + Vertime uint64 `protobuf:"varint,4,opt,name=vertime,proto3" json:"vertime,omitempty"` + Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` + Members []*ArbiterMemberStatus `protobuf:"bytes,6,rep,name=members,proto3" json:"members,omitempty"` + CommitId uint64 `protobuf:"varint,7,opt,name=commit_id,json=commitId,proto3" json:"commit_id,omitempty"` } func (x *ArbiterMemberRemoveResponse) Reset() { *x = ArbiterMemberRemoveResponse{} if protoimpl.UnsafeEnabled { - mi := &file_arbiter_proto_msgTypes[23] + mi := &file_arbiter_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1553,7 +1704,7 @@ func (x *ArbiterMemberRemoveResponse) String() string { func (*ArbiterMemberRemoveResponse) ProtoMessage() {} func (x *ArbiterMemberRemoveResponse) ProtoReflect() protoreflect.Message { - mi := &file_arbiter_proto_msgTypes[23] + mi := &file_arbiter_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1566,7 +1717,7 @@ func (x *ArbiterMemberRemoveResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ArbiterMemberRemoveResponse.ProtoReflect.Descriptor instead. func (*ArbiterMemberRemoveResponse) Descriptor() ([]byte, []int) { - return file_arbiter_proto_rawDescGZIP(), []int{23} + return file_arbiter_proto_rawDescGZIP(), []int{24} } func (x *ArbiterMemberRemoveResponse) GetName() string { @@ -1604,7 +1755,7 @@ func (x *ArbiterMemberRemoveResponse) GetOwner() string { return "" } -func (x *ArbiterMemberRemoveResponse) GetMembers() []*ReplSetMember { +func (x *ArbiterMemberRemoveResponse) GetMembers() []*ArbiterMemberStatus { if x != nil { return x.Members } @@ -1706,105 +1857,131 @@ var file_arbiter_proto_rawDesc = []byte{ 0x0a, 0x65, 0x72, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x6f, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6f, 0x66, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x5c, 0x0a, 0x14, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0xc9, 0x02, 0x0a, 0x13, 0x41, 0x72, 0x62, 0x69, 0x74, + 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x72, 0x62, - 0x69, 0x74, 0x65, 0x72, 0x22, 0xd7, 0x01, 0x0a, 0x15, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x67, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x31, - 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x53, - 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, 0x3c, - 0x0a, 0x18, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6f, - 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0b, 0x70, 0x6f, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xdb, 0x01, 0x0a, - 0x19, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x69, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x20, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, + 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x61, 0x6f, 0x66, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x61, + 0x6f, 0x66, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x53, 0x65, 0x6c, 0x66, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x65, 0x6c, 0x66, 0x12, 0x1c, 0x0a, 0x09, + 0x61, 0x62, 0x73, 0x74, 0x69, 0x61, 0x6e, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x61, 0x62, 0x73, 0x74, 0x69, 0x61, 0x6e, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, + 0x6f, 0x73, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, + 0x65, 0x64, 0x22, 0x5c, 0x0a, 0x14, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x72, 0x62, 0x69, 0x74, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, + 0x22, 0xdd, 0x01, 0x0a, 0x15, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x53, 0x65, 0x74, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, - 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x17, 0x41, 0x72, - 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x07, 0x61, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x22, 0xda, 0x01, 0x0a, 0x18, - 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 0x64, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x07, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, + 0x22, 0x70, 0x0a, 0x18, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, + 0x70, 0x6f, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0b, 0x70, 0x6f, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x1a, 0x41, 0x72, 0x62, 0x69, - 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x22, 0xdd, 0x01, 0x0a, - 0x1b, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, - 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x07, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x53, 0x65, 0x74, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, - 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x1a, - 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, - 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x22, 0xdd, + 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x6d, 0x65, 0x22, 0xe1, 0x01, 0x0a, 0x19, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x12, 0x37, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x72, 0x62, + 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x17, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, + 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, + 0x61, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x22, 0xe0, 0x01, 0x0a, 0x18, 0x41, 0x72, 0x62, 0x69, + 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x1a, 0x41, 0x72, + 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x22, 0xe3, 0x01, 0x0a, 0x1b, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x31, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x53, - 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x42, 0x2b, - 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6e, 0x6f, - 0x77, 0x65, 0x72, 0x2f, 0x73, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x72, 0x62, 0x69, 0x74, + 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x07, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x1a, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x22, 0xe3, 0x01, 0x0a, 0x1b, 0x41, 0x72, 0x62, 0x69, 0x74, + 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x72, 0x62, 0x69, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, + 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x42, 0x2b, 0x5a, 0x29, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6e, 0x6f, 0x77, 0x65, + 0x72, 0x2f, 0x73, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1819,7 +1996,7 @@ func file_arbiter_proto_rawDescGZIP() []byte { return file_arbiter_proto_rawDescData } -var file_arbiter_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_arbiter_proto_msgTypes = make([]protoimpl.MessageInfo, 25) var file_arbiter_proto_goTypes = []interface{}{ (*ReplSetMember)(nil), // 0: protobuf.ReplSetMember (*ReplSet)(nil), // 1: protobuf.ReplSet @@ -1835,30 +2012,31 @@ var file_arbiter_proto_goTypes = []interface{}{ (*ArbiterCommitResponse)(nil), // 11: protobuf.ArbiterCommitResponse (*ArbiterStatusRequest)(nil), // 12: protobuf.ArbiterStatusRequest (*ArbiterStatusResponse)(nil), // 13: protobuf.ArbiterStatusResponse - (*ArbiterConfigRequest)(nil), // 14: protobuf.ArbiterConfigRequest - (*ArbiterConfigResponse)(nil), // 15: protobuf.ArbiterConfigResponse - (*ArbiterMemberListRequest)(nil), // 16: protobuf.ArbiterMemberListRequest - (*ArbiterMemberListResponse)(nil), // 17: protobuf.ArbiterMemberListResponse - (*ArbiterMemberAddRequest)(nil), // 18: protobuf.ArbiterMemberAddRequest - (*ArbiterMemberAddResponse)(nil), // 19: protobuf.ArbiterMemberAddResponse - (*ArbiterMemberUpdateRequest)(nil), // 20: protobuf.ArbiterMemberUpdateRequest - (*ArbiterMemberUpdateResponse)(nil), // 21: protobuf.ArbiterMemberUpdateResponse - (*ArbiterMemberRemoveRequest)(nil), // 22: protobuf.ArbiterMemberRemoveRequest - (*ArbiterMemberRemoveResponse)(nil), // 23: protobuf.ArbiterMemberRemoveResponse + (*ArbiterMemberStatus)(nil), // 14: protobuf.ArbiterMemberStatus + (*ArbiterConfigRequest)(nil), // 15: protobuf.ArbiterConfigRequest + (*ArbiterConfigResponse)(nil), // 16: protobuf.ArbiterConfigResponse + (*ArbiterMemberListRequest)(nil), // 17: protobuf.ArbiterMemberListRequest + (*ArbiterMemberListResponse)(nil), // 18: protobuf.ArbiterMemberListResponse + (*ArbiterMemberAddRequest)(nil), // 19: protobuf.ArbiterMemberAddRequest + (*ArbiterMemberAddResponse)(nil), // 20: protobuf.ArbiterMemberAddResponse + (*ArbiterMemberUpdateRequest)(nil), // 21: protobuf.ArbiterMemberUpdateRequest + (*ArbiterMemberUpdateResponse)(nil), // 22: protobuf.ArbiterMemberUpdateResponse + (*ArbiterMemberRemoveRequest)(nil), // 23: protobuf.ArbiterMemberRemoveRequest + (*ArbiterMemberRemoveResponse)(nil), // 24: protobuf.ArbiterMemberRemoveResponse } var file_arbiter_proto_depIdxs = []int32{ - 0, // 0: protobuf.ReplSet.members:type_name -> protobuf.ReplSetMember - 1, // 1: protobuf.ArbiterAnnouncementRequest.replset:type_name -> protobuf.ReplSet - 0, // 2: protobuf.ArbiterConfigResponse.members:type_name -> protobuf.ReplSetMember - 0, // 3: protobuf.ArbiterMemberListResponse.members:type_name -> protobuf.ReplSetMember - 0, // 4: protobuf.ArbiterMemberAddResponse.members:type_name -> protobuf.ReplSetMember - 0, // 5: protobuf.ArbiterMemberUpdateResponse.members:type_name -> protobuf.ReplSetMember - 0, // 6: protobuf.ArbiterMemberRemoveResponse.members:type_name -> protobuf.ReplSetMember - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 0, // 0: protobuf.ReplSet.members:type_name -> protobuf.ReplSetMember + 1, // 1: protobuf.ArbiterAnnouncementRequest.replset:type_name -> protobuf.ReplSet + 14, // 2: protobuf.ArbiterConfigResponse.members:type_name -> protobuf.ArbiterMemberStatus + 14, // 3: protobuf.ArbiterMemberListResponse.members:type_name -> protobuf.ArbiterMemberStatus + 14, // 4: protobuf.ArbiterMemberAddResponse.members:type_name -> protobuf.ArbiterMemberStatus + 14, // 5: protobuf.ArbiterMemberUpdateResponse.members:type_name -> protobuf.ArbiterMemberStatus + 14, // 6: protobuf.ArbiterMemberRemoveResponse.members:type_name -> protobuf.ArbiterMemberStatus + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_arbiter_proto_init() } @@ -2036,7 +2214,7 @@ func file_arbiter_proto_init() { } } file_arbiter_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArbiterConfigRequest); i { + switch v := v.(*ArbiterMemberStatus); i { case 0: return &v.state case 1: @@ -2048,7 +2226,7 @@ func file_arbiter_proto_init() { } } file_arbiter_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArbiterConfigResponse); i { + switch v := v.(*ArbiterConfigRequest); i { case 0: return &v.state case 1: @@ -2060,7 +2238,7 @@ func file_arbiter_proto_init() { } } file_arbiter_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArbiterMemberListRequest); i { + switch v := v.(*ArbiterConfigResponse); i { case 0: return &v.state case 1: @@ -2072,7 +2250,7 @@ func file_arbiter_proto_init() { } } file_arbiter_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArbiterMemberListResponse); i { + switch v := v.(*ArbiterMemberListRequest); i { case 0: return &v.state case 1: @@ -2084,7 +2262,7 @@ func file_arbiter_proto_init() { } } file_arbiter_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArbiterMemberAddRequest); i { + switch v := v.(*ArbiterMemberListResponse); i { case 0: return &v.state case 1: @@ -2096,7 +2274,7 @@ func file_arbiter_proto_init() { } } file_arbiter_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArbiterMemberAddResponse); i { + switch v := v.(*ArbiterMemberAddRequest); i { case 0: return &v.state case 1: @@ -2108,7 +2286,7 @@ func file_arbiter_proto_init() { } } file_arbiter_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArbiterMemberUpdateRequest); i { + switch v := v.(*ArbiterMemberAddResponse); i { case 0: return &v.state case 1: @@ -2120,7 +2298,7 @@ func file_arbiter_proto_init() { } } file_arbiter_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArbiterMemberUpdateResponse); i { + switch v := v.(*ArbiterMemberUpdateRequest); i { case 0: return &v.state case 1: @@ -2132,7 +2310,7 @@ func file_arbiter_proto_init() { } } file_arbiter_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArbiterMemberRemoveRequest); i { + switch v := v.(*ArbiterMemberUpdateResponse); i { case 0: return &v.state case 1: @@ -2144,6 +2322,18 @@ func file_arbiter_proto_init() { } } file_arbiter_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArbiterMemberRemoveRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_arbiter_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ArbiterMemberRemoveResponse); i { case 0: return &v.state @@ -2162,7 +2352,7 @@ func file_arbiter_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_arbiter_proto_rawDesc, NumEnums: 0, - NumMessages: 24, + NumMessages: 25, NumExtensions: 0, NumServices: 0, }, diff --git a/protocol/protobuf/arbiter.proto b/protocol/protobuf/arbiter.proto index f37b59d..f8eb2d4 100644 --- a/protocol/protobuf/arbiter.proto +++ b/protocol/protobuf/arbiter.proto @@ -81,6 +81,21 @@ message ArbiterStatusResponse { uint32 role = 3; } +message ArbiterMemberStatus { + string host = 1; + uint32 weight = 2; + uint32 arbiter = 3; + uint32 role = 4; + uint32 status = 5; + int64 lastUpdated = 6; + int64 lastDelay = 7; + int32 lastError = 8; + bytes aofId = 9; + bool isSelf = 10; + bool abstianed = 11; + bool closed = 12; +} + message ArbiterConfigRequest { string host = 1; uint32 weight = 2; @@ -93,12 +108,14 @@ message ArbiterConfigResponse { uint32 version = 3; uint64 vertime = 4; string owner = 5; - repeated ReplSetMember members = 6; + repeated ArbiterMemberStatus members = 6; uint64 commit_id = 7; } message ArbiterMemberListRequest { uint32 pollTimeout = 1; + uint32 version = 2; + uint64 vertime = 3; } message ArbiterMemberListResponse { @@ -107,7 +124,7 @@ message ArbiterMemberListResponse { uint32 version = 3; uint64 vertime = 4; string owner = 5; - repeated ReplSetMember members = 6; + repeated ArbiterMemberStatus members = 6; uint64 commit_id = 7; } @@ -123,7 +140,7 @@ message ArbiterMemberAddResponse { uint32 version = 3; uint64 vertime = 4; string owner = 5; - repeated ReplSetMember members = 6; + repeated ArbiterMemberStatus members = 6; uint64 commit_id = 7; } @@ -139,7 +156,7 @@ message ArbiterMemberUpdateResponse { uint32 version = 3; uint64 vertime = 4; string owner = 5; - repeated ReplSetMember members = 6; + repeated ArbiterMemberStatus members = 6; uint64 commit_id = 7; } @@ -153,6 +170,6 @@ message ArbiterMemberRemoveResponse { uint32 version = 3; uint64 vertime = 4; string owner = 5; - repeated ReplSetMember members = 6; + repeated ArbiterMemberStatus members = 6; uint64 commit_id = 7; } \ No newline at end of file diff --git a/server/arbiter.go b/server/arbiter.go index 20c0a0d..f7484ae 100644 --- a/server/arbiter.go +++ b/server/arbiter.go @@ -2314,10 +2314,12 @@ func (self *ArbiterManager) commandHandleConfigCommand(serverProtocol *BinarySer return protocol.NewCallResultCommand(command, 0, "ERR_UNINIT", nil), nil } - members := make([]*protobuf.ReplSetMember, 0) + members := make([]*protobuf.ArbiterMemberStatus, 0) for _, member := range self.members { - rplm := &protobuf.ReplSetMember{Host: member.host, Weight: member.weight, Arbiter: member.arbiter, Role: uint32(member.role)} - members = append(members, rplm) + memberStatus := &protobuf.ArbiterMemberStatus{Host: member.host, Weight: member.weight, Arbiter: member.arbiter, Role: uint32(member.role), + Status: uint32(member.status), LastUpdated: member.lastUpdated, LastDelay: member.lastDelay, LastError: int32(member.lastError), AofId: member.aofId[:], + IsSelf: member.isSelf, Abstianed: member.abstianed, Closed: member.closed} + members = append(members, memberStatus) } response := protobuf.ArbiterConfigResponse{Name: self.name, Gid: self.gid, Version: self.version, Vertime: self.vertime, @@ -2345,10 +2347,12 @@ func (self *ArbiterManager) commandHandleMemberListCommand(serverProtocol *Binar return protocol.NewCallResultCommand(command, 0, "ERR_UNINIT", nil) } - members := make([]*protobuf.ReplSetMember, 0) + members := make([]*protobuf.ArbiterMemberStatus, 0) for _, member := range self.members { - rplm := &protobuf.ReplSetMember{Host: member.host, Weight: member.weight, Arbiter: member.arbiter, Role: uint32(member.role)} - members = append(members, rplm) + memberStatus := &protobuf.ArbiterMemberStatus{Host: member.host, Weight: member.weight, Arbiter: member.arbiter, Role: uint32(member.role), + Status: uint32(member.status), LastUpdated: member.lastUpdated, LastDelay: member.lastDelay, LastError: int32(member.lastError), AofId: member.aofId[:], + IsSelf: member.isSelf, Abstianed: member.abstianed, Closed: member.closed} + members = append(members, memberStatus) } response := protobuf.ArbiterMemberListResponse{Name: self.name, Gid: self.gid, Version: self.version, Vertime: self.vertime, @@ -2361,6 +2365,10 @@ func (self *ArbiterManager) commandHandleMemberListCommand(serverProtocol *Binar } if request.PollTimeout > 0 && self.voter != nil { + if request.Version < self.version || request.Vertime < self.vertime { + return getResultCommand(), nil + } + self.voter.addSubscriber(&ArbiterVoterSubscriber{serverProtocol: serverProtocol, command: command, handler: func(subscriber *ArbiterVoterSubscriber, b bool) { _ = subscriber.serverProtocol.Write(getResultCommand()) }, timeoutTime: time.Now().Unix() + int64(request.PollTimeout)}) @@ -2389,10 +2397,12 @@ func (self *ArbiterManager) commandHandleMemberAddCommand(serverProtocol *Binary return protocol.NewCallResultCommand(command, 0, "ERR_UNINIT", nil), nil } - members := make([]*protobuf.ReplSetMember, 0) + members := make([]*protobuf.ArbiterMemberStatus, 0) for _, member := range self.members { - rplm := &protobuf.ReplSetMember{Host: member.host, Weight: member.weight, Arbiter: member.arbiter, Role: uint32(member.role)} - members = append(members, rplm) + memberStatus := &protobuf.ArbiterMemberStatus{Host: member.host, Weight: member.weight, Arbiter: member.arbiter, Role: uint32(member.role), + Status: uint32(member.status), LastUpdated: member.lastUpdated, LastDelay: member.lastDelay, LastError: int32(member.lastError), AofId: member.aofId[:], + IsSelf: member.isSelf, Abstianed: member.abstianed, Closed: member.closed} + members = append(members, memberStatus) } response := protobuf.ArbiterMemberAddResponse{Name: self.name, Gid: self.gid, Version: self.version, Vertime: self.vertime, @@ -2424,10 +2434,12 @@ func (self *ArbiterManager) commandHandleMemberUpdateCommand(serverProtocol *Bin return protocol.NewCallResultCommand(command, 0, "ERR_UNINIT", nil), nil } - members := make([]*protobuf.ReplSetMember, 0) + members := make([]*protobuf.ArbiterMemberStatus, 0) for _, member := range self.members { - rplm := &protobuf.ReplSetMember{Host: member.host, Weight: member.weight, Arbiter: member.arbiter, Role: uint32(member.role)} - members = append(members, rplm) + memberStatus := &protobuf.ArbiterMemberStatus{Host: member.host, Weight: member.weight, Arbiter: member.arbiter, Role: uint32(member.role), + Status: uint32(member.status), LastUpdated: member.lastUpdated, LastDelay: member.lastDelay, LastError: int32(member.lastError), AofId: member.aofId[:], + IsSelf: member.isSelf, Abstianed: member.abstianed, Closed: member.closed} + members = append(members, memberStatus) } response := protobuf.ArbiterMemberUpdateResponse{Name: self.name, Gid: self.gid, Version: self.version, Vertime: self.vertime, @@ -2459,10 +2471,12 @@ func (self *ArbiterManager) commandHandleMemberRemoveCommand(serverProtocol *Bin return protocol.NewCallResultCommand(command, 0, "ERR_UNINIT", nil), nil } - members := make([]*protobuf.ReplSetMember, 0) + members := make([]*protobuf.ArbiterMemberStatus, 0) for _, member := range self.members { - rplm := &protobuf.ReplSetMember{Host: member.host, Weight: member.weight, Arbiter: member.arbiter, Role: uint32(member.role)} - members = append(members, rplm) + memberStatus := &protobuf.ArbiterMemberStatus{Host: member.host, Weight: member.weight, Arbiter: member.arbiter, Role: uint32(member.role), + Status: uint32(member.status), LastUpdated: member.lastUpdated, LastDelay: member.lastDelay, LastError: int32(member.lastError), AofId: member.aofId[:], + IsSelf: member.isSelf, Abstianed: member.abstianed, Closed: member.closed} + members = append(members, memberStatus) } response := protobuf.ArbiterMemberRemoveResponse{Name: self.name, Gid: self.gid, Version: self.version, Vertime: self.vertime,