mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-09 08:50:26 +08:00
实现基本的集群DNS列表、设置、简单数据同步
This commit is contained in:
@@ -656,37 +656,36 @@ var file_service_db_node_proto_rawDesc = []byte{
|
||||
0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x32, 0xca, 0x03, 0x0a, 0x0d, 0x44, 0x42, 0x4e, 0x6f, 0x64,
|
||||
0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x32, 0xbe, 0x03, 0x0a, 0x0d, 0x44, 0x42, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x75,
|
||||
0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x75,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 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, 0x3d, 0x0a, 0x0c, 0x64, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x51, 0x0a, 0x16, 0x63, 0x6f, 0x75,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63,
|
||||
0x63, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x51, 0x0a,
|
||||
0x16, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c,
|
||||
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12,
|
||||
0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x53, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44,
|
||||
0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45,
|
||||
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
|
||||
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x42, 0x4e, 0x6f, 0x64, 0x65, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -713,9 +712,8 @@ var file_service_db_node_proto_goTypes = []interface{}{
|
||||
(*FindEnabledDBNodeRequest)(nil), // 7: pb.FindEnabledDBNodeRequest
|
||||
(*FindEnabledDBNodeResponse)(nil), // 8: pb.FindEnabledDBNodeResponse
|
||||
(*DBNode)(nil), // 9: pb.DBNode
|
||||
(*RPCUpdateSuccess)(nil), // 10: pb.RPCUpdateSuccess
|
||||
(*RPCDeleteSuccess)(nil), // 11: pb.RPCDeleteSuccess
|
||||
(*RPCCountResponse)(nil), // 12: pb.RPCCountResponse
|
||||
(*RPCSuccess)(nil), // 10: pb.RPCSuccess
|
||||
(*RPCCountResponse)(nil), // 11: pb.RPCCountResponse
|
||||
}
|
||||
var file_service_db_node_proto_depIdxs = []int32{
|
||||
9, // 0: pb.ListEnabledDBNodesResponse.nodes:type_name -> pb.DBNode
|
||||
@@ -727,9 +725,9 @@ var file_service_db_node_proto_depIdxs = []int32{
|
||||
5, // 6: pb.DBNodeService.listEnabledDBNodes:input_type -> pb.ListEnabledDBNodesRequest
|
||||
7, // 7: pb.DBNodeService.findEnabledDBNode:input_type -> pb.FindEnabledDBNodeRequest
|
||||
1, // 8: pb.DBNodeService.createDBNode:output_type -> pb.CreateDBNodeResponse
|
||||
10, // 9: pb.DBNodeService.updateDBNode:output_type -> pb.RPCUpdateSuccess
|
||||
11, // 10: pb.DBNodeService.deleteDBNode:output_type -> pb.RPCDeleteSuccess
|
||||
12, // 11: pb.DBNodeService.countAllEnabledDBNodes:output_type -> pb.RPCCountResponse
|
||||
10, // 9: pb.DBNodeService.updateDBNode:output_type -> pb.RPCSuccess
|
||||
10, // 10: pb.DBNodeService.deleteDBNode:output_type -> pb.RPCSuccess
|
||||
11, // 11: pb.DBNodeService.countAllEnabledDBNodes:output_type -> pb.RPCCountResponse
|
||||
6, // 12: pb.DBNodeService.listEnabledDBNodes:output_type -> pb.ListEnabledDBNodesResponse
|
||||
8, // 13: pb.DBNodeService.findEnabledDBNode:output_type -> pb.FindEnabledDBNodeResponse
|
||||
8, // [8:14] is the sub-list for method output_type
|
||||
@@ -891,9 +889,9 @@ type DBNodeServiceClient interface {
|
||||
// 创建数据库节点
|
||||
CreateDBNode(ctx context.Context, in *CreateDBNodeRequest, opts ...grpc.CallOption) (*CreateDBNodeResponse, error)
|
||||
// 修改数据库节点
|
||||
UpdateDBNode(ctx context.Context, in *UpdateDBNodeRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error)
|
||||
UpdateDBNode(ctx context.Context, in *UpdateDBNodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 删除节点
|
||||
DeleteDBNode(ctx context.Context, in *DeleteDBNodeRequest, opts ...grpc.CallOption) (*RPCDeleteSuccess, error)
|
||||
DeleteDBNode(ctx context.Context, in *DeleteDBNodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 计算可用的数据库节点数量
|
||||
CountAllEnabledDBNodes(ctx context.Context, in *CountAllEnabledDBNodesRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
|
||||
// 列出单页的数据库节点
|
||||
@@ -919,8 +917,8 @@ func (c *dBNodeServiceClient) CreateDBNode(ctx context.Context, in *CreateDBNode
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dBNodeServiceClient) UpdateDBNode(ctx context.Context, in *UpdateDBNodeRequest, opts ...grpc.CallOption) (*RPCUpdateSuccess, error) {
|
||||
out := new(RPCUpdateSuccess)
|
||||
func (c *dBNodeServiceClient) UpdateDBNode(ctx context.Context, in *UpdateDBNodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.DBNodeService/updateDBNode", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -928,8 +926,8 @@ func (c *dBNodeServiceClient) UpdateDBNode(ctx context.Context, in *UpdateDBNode
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dBNodeServiceClient) DeleteDBNode(ctx context.Context, in *DeleteDBNodeRequest, opts ...grpc.CallOption) (*RPCDeleteSuccess, error) {
|
||||
out := new(RPCDeleteSuccess)
|
||||
func (c *dBNodeServiceClient) DeleteDBNode(ctx context.Context, in *DeleteDBNodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, "/pb.DBNodeService/deleteDBNode", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -969,9 +967,9 @@ type DBNodeServiceServer interface {
|
||||
// 创建数据库节点
|
||||
CreateDBNode(context.Context, *CreateDBNodeRequest) (*CreateDBNodeResponse, error)
|
||||
// 修改数据库节点
|
||||
UpdateDBNode(context.Context, *UpdateDBNodeRequest) (*RPCUpdateSuccess, error)
|
||||
UpdateDBNode(context.Context, *UpdateDBNodeRequest) (*RPCSuccess, error)
|
||||
// 删除节点
|
||||
DeleteDBNode(context.Context, *DeleteDBNodeRequest) (*RPCDeleteSuccess, error)
|
||||
DeleteDBNode(context.Context, *DeleteDBNodeRequest) (*RPCSuccess, error)
|
||||
// 计算可用的数据库节点数量
|
||||
CountAllEnabledDBNodes(context.Context, *CountAllEnabledDBNodesRequest) (*RPCCountResponse, error)
|
||||
// 列出单页的数据库节点
|
||||
@@ -987,10 +985,10 @@ type UnimplementedDBNodeServiceServer struct {
|
||||
func (*UnimplementedDBNodeServiceServer) CreateDBNode(context.Context, *CreateDBNodeRequest) (*CreateDBNodeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateDBNode not implemented")
|
||||
}
|
||||
func (*UnimplementedDBNodeServiceServer) UpdateDBNode(context.Context, *UpdateDBNodeRequest) (*RPCUpdateSuccess, error) {
|
||||
func (*UnimplementedDBNodeServiceServer) UpdateDBNode(context.Context, *UpdateDBNodeRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateDBNode not implemented")
|
||||
}
|
||||
func (*UnimplementedDBNodeServiceServer) DeleteDBNode(context.Context, *DeleteDBNodeRequest) (*RPCDeleteSuccess, error) {
|
||||
func (*UnimplementedDBNodeServiceServer) DeleteDBNode(context.Context, *DeleteDBNodeRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteDBNode not implemented")
|
||||
}
|
||||
func (*UnimplementedDBNodeServiceServer) CountAllEnabledDBNodes(context.Context, *CountAllEnabledDBNodesRequest) (*RPCCountResponse, error) {
|
||||
|
||||
Reference in New Issue
Block a user