实现基本的集群DNS列表、设置、简单数据同步

This commit is contained in:
刘祥超
2020-11-13 18:23:06 +08:00
parent 5820354c90
commit 3e4a50e564
74 changed files with 3533 additions and 2115 deletions

View File

@@ -25,14 +25,15 @@ const (
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type RPCUpdateSuccess struct {
// 操作成功
type RPCSuccess struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *RPCUpdateSuccess) Reset() {
*x = RPCUpdateSuccess{}
func (x *RPCSuccess) Reset() {
*x = RPCSuccess{}
if protoimpl.UnsafeEnabled {
mi := &file_rpc_messages_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -40,13 +41,13 @@ func (x *RPCUpdateSuccess) Reset() {
}
}
func (x *RPCUpdateSuccess) String() string {
func (x *RPCSuccess) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RPCUpdateSuccess) ProtoMessage() {}
func (*RPCSuccess) ProtoMessage() {}
func (x *RPCUpdateSuccess) ProtoReflect() protoreflect.Message {
func (x *RPCSuccess) ProtoReflect() protoreflect.Message {
mi := &file_rpc_messages_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -58,49 +59,12 @@ func (x *RPCUpdateSuccess) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use RPCUpdateSuccess.ProtoReflect.Descriptor instead.
func (*RPCUpdateSuccess) Descriptor() ([]byte, []int) {
// Deprecated: Use RPCSuccess.ProtoReflect.Descriptor instead.
func (*RPCSuccess) Descriptor() ([]byte, []int) {
return file_rpc_messages_proto_rawDescGZIP(), []int{0}
}
type RPCDeleteSuccess struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *RPCDeleteSuccess) Reset() {
*x = RPCDeleteSuccess{}
if protoimpl.UnsafeEnabled {
mi := &file_rpc_messages_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RPCDeleteSuccess) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RPCDeleteSuccess) ProtoMessage() {}
func (x *RPCDeleteSuccess) ProtoReflect() protoreflect.Message {
mi := &file_rpc_messages_proto_msgTypes[1]
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 RPCDeleteSuccess.ProtoReflect.Descriptor instead.
func (*RPCDeleteSuccess) Descriptor() ([]byte, []int) {
return file_rpc_messages_proto_rawDescGZIP(), []int{1}
}
// 返回数量
type RPCCountResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -112,7 +76,7 @@ type RPCCountResponse struct {
func (x *RPCCountResponse) Reset() {
*x = RPCCountResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_rpc_messages_proto_msgTypes[2]
mi := &file_rpc_messages_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -125,7 +89,7 @@ func (x *RPCCountResponse) String() string {
func (*RPCCountResponse) ProtoMessage() {}
func (x *RPCCountResponse) ProtoReflect() protoreflect.Message {
mi := &file_rpc_messages_proto_msgTypes[2]
mi := &file_rpc_messages_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -138,7 +102,7 @@ func (x *RPCCountResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use RPCCountResponse.ProtoReflect.Descriptor instead.
func (*RPCCountResponse) Descriptor() ([]byte, []int) {
return file_rpc_messages_proto_rawDescGZIP(), []int{2}
return file_rpc_messages_proto_rawDescGZIP(), []int{1}
}
func (x *RPCCountResponse) GetCount() int64 {
@@ -152,13 +116,11 @@ var File_rpc_messages_proto protoreflect.FileDescriptor
var file_rpc_messages_proto_rawDesc = []byte{
0x0a, 0x12, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x12, 0x0a, 0x10, 0x52, 0x50, 0x43, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x12, 0x0a, 0x10,
0x52, 0x50, 0x43, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
0x22, 0x28, 0x0a, 0x10, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x0c, 0x0a, 0x0a, 0x52, 0x50, 0x43, 0x53,
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x28, 0x0a, 0x10, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -173,11 +135,10 @@ func file_rpc_messages_proto_rawDescGZIP() []byte {
return file_rpc_messages_proto_rawDescData
}
var file_rpc_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_rpc_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_rpc_messages_proto_goTypes = []interface{}{
(*RPCUpdateSuccess)(nil), // 0: pb.RPCUpdateSuccess
(*RPCDeleteSuccess)(nil), // 1: pb.RPCDeleteSuccess
(*RPCCountResponse)(nil), // 2: pb.RPCCountResponse
(*RPCSuccess)(nil), // 0: pb.RPCSuccess
(*RPCCountResponse)(nil), // 1: pb.RPCCountResponse
}
var file_rpc_messages_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
@@ -194,7 +155,7 @@ func file_rpc_messages_proto_init() {
}
if !protoimpl.UnsafeEnabled {
file_rpc_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPCUpdateSuccess); i {
switch v := v.(*RPCSuccess); i {
case 0:
return &v.state
case 1:
@@ -206,18 +167,6 @@ func file_rpc_messages_proto_init() {
}
}
file_rpc_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPCDeleteSuccess); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_rpc_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RPCCountResponse); i {
case 0:
return &v.state
@@ -236,7 +185,7 @@ func file_rpc_messages_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_rpc_messages_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},