实现基本的集群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

@@ -835,7 +835,7 @@ var file_service_admin_proto_rawDesc = []byte{
0x69, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0xec, 0x04, 0x0a,
0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0xe0, 0x04, 0x0a,
0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a,
0x0a, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x15, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
@@ -866,16 +866,15 @@ var file_service_admin_proto_rawDesc = []byte{
0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74,
0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14,
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63,
0x63, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64,
0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e,
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3f,
0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67,
0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64,
0x6d, 0x69, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -907,7 +906,7 @@ var file_service_admin_proto_goTypes = []interface{}{
(*UpdateAdminRequest)(nil), // 12: pb.UpdateAdminRequest
(*UpdateAdminLoginRequest)(nil), // 13: pb.UpdateAdminLoginRequest
(*Admin)(nil), // 14: pb.Admin
(*RPCUpdateSuccess)(nil), // 15: pb.RPCUpdateSuccess
(*RPCSuccess)(nil), // 15: pb.RPCSuccess
}
var file_service_admin_proto_depIdxs = []int32{
14, // 0: pb.FindEnabledAdminResponse.admin:type_name -> pb.Admin
@@ -925,8 +924,8 @@ var file_service_admin_proto_depIdxs = []int32{
7, // 12: pb.AdminService.findAdminFullname:output_type -> pb.FindAdminFullnameResponse
9, // 13: pb.AdminService.findEnabledAdmin:output_type -> pb.FindEnabledAdminResponse
11, // 14: pb.AdminService.createOrUpdateAdmin:output_type -> pb.CreateOrUpdateAdminResponse
15, // 15: pb.AdminService.updateAdmin:output_type -> pb.RPCUpdateSuccess
15, // 16: pb.AdminService.updateAdminLogin:output_type -> pb.RPCUpdateSuccess
15, // 15: pb.AdminService.updateAdmin:output_type -> pb.RPCSuccess
15, // 16: pb.AdminService.updateAdminLogin:output_type -> pb.RPCSuccess
9, // [9:17] is the sub-list for method output_type
1, // [1:9] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
@@ -1156,9 +1155,9 @@ type AdminServiceClient interface {
// 创建或修改管理员
CreateOrUpdateAdmin(ctx context.Context, in *CreateOrUpdateAdminRequest, opts ...grpc.CallOption) (*CreateOrUpdateAdminResponse, error)
// 修改管理员信息
UpdateAdmin(ctx context.Context, in *UpdateAdminRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error)
UpdateAdmin(ctx context.Context, in *UpdateAdminRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 修改管理员登录信息
UpdateAdminLogin(ctx context.Context, in *UpdateAdminLoginRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error)
UpdateAdminLogin(ctx context.Context, in *UpdateAdminLoginRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type adminServiceClient struct {
@@ -1223,8 +1222,8 @@ func (c *adminServiceClient) CreateOrUpdateAdmin(ctx context.Context, in *Create
return out, nil
}
func (c *adminServiceClient) UpdateAdmin(ctx context.Context, in *UpdateAdminRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error) {
out := new(RPCUpdateSuccess)
func (c *adminServiceClient) UpdateAdmin(ctx context.Context, in *UpdateAdminRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.AdminService/updateAdmin", in, out, opts...)
if err != nil {
return nil, err
@@ -1232,8 +1231,8 @@ func (c *adminServiceClient) UpdateAdmin(ctx context.Context, in *UpdateAdminReq
return out, nil
}
func (c *adminServiceClient) UpdateAdminLogin(ctx context.Context, in *UpdateAdminLoginRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error) {
out := new(RPCUpdateSuccess)
func (c *adminServiceClient) UpdateAdminLogin(ctx context.Context, in *UpdateAdminLoginRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.AdminService/updateAdminLogin", in, out, opts...)
if err != nil {
return nil, err
@@ -1256,9 +1255,9 @@ type AdminServiceServer interface {
// 创建或修改管理员
CreateOrUpdateAdmin(context.Context, *CreateOrUpdateAdminRequest) (*CreateOrUpdateAdminResponse, error)
// 修改管理员信息
UpdateAdmin(context.Context, *UpdateAdminRequest) (*RPCUpdateSuccess, error)
UpdateAdmin(context.Context, *UpdateAdminRequest) (*RPCSuccess, error)
// 修改管理员登录信息
UpdateAdminLogin(context.Context, *UpdateAdminLoginRequest) (*RPCUpdateSuccess, error)
UpdateAdminLogin(context.Context, *UpdateAdminLoginRequest) (*RPCSuccess, error)
}
// UnimplementedAdminServiceServer can be embedded to have forward compatible implementations.
@@ -1283,10 +1282,10 @@ func (*UnimplementedAdminServiceServer) FindEnabledAdmin(context.Context, *FindE
func (*UnimplementedAdminServiceServer) CreateOrUpdateAdmin(context.Context, *CreateOrUpdateAdminRequest) (*CreateOrUpdateAdminResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateOrUpdateAdmin not implemented")
}
func (*UnimplementedAdminServiceServer) UpdateAdmin(context.Context, *UpdateAdminRequest) (*RPCUpdateSuccess, error) {
func (*UnimplementedAdminServiceServer) UpdateAdmin(context.Context, *UpdateAdminRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateAdmin not implemented")
}
func (*UnimplementedAdminServiceServer) UpdateAdminLogin(context.Context, *UpdateAdminLoginRequest) (*RPCUpdateSuccess, error) {
func (*UnimplementedAdminServiceServer) UpdateAdminLogin(context.Context, *UpdateAdminLoginRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateAdminLogin not implemented")
}