# DNSTaskService
> DNS同步相关任务

---

## deleteAllDNSTasks
> 删除所有同步任务

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/DNSTaskService/deleteAllDNSTasks`
- RPC：`rpc deleteAllDNSTasks(DeleteAllDNSTasksRequest) returns (RPCSuccess);`

**请求对象 (`DeleteAllDNSTasksRequest`)**

```json
{}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/DNSTaskService/deleteAllDNSTasks" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## deleteDNSTask
> 删除任务

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/DNSTaskService/deleteDNSTask`
- RPC：`rpc deleteDNSTask (DeleteDNSTaskRequest) returns (RPCSuccess);`

**请求对象 (`DeleteDNSTaskRequest`)**

```json
{
  "dnsTaskId": "int64"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/DNSTaskService/deleteDNSTask" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## existsDNSTasks
> 检查是否有正在执行的任务

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/DNSTaskService/existsDNSTasks`
- RPC：`rpc existsDNSTasks (ExistsDNSTasksRequest) returns (ExistsDNSTasksResponse);`

**请求对象 (`ExistsDNSTasksRequest`)**

```json
{}
```

**响应对象 (`ExistsDNSTasksResponse`)**

```json
{
  "existTasks": "bool",
  "existError": "bool"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/DNSTaskService/existsDNSTasks" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findAllDoingDNSTasks
> 查找正在执行的所有任务

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/DNSTaskService/findAllDoingDNSTasks`
- RPC：`rpc findAllDoingDNSTasks (FindAllDoingDNSTasksRequest) returns (FindAllDoingDNSTasksResponse);`

**请求对象 (`FindAllDoingDNSTasksRequest`)**

```json
{
  "nodeClusterId": "int64 // 集群ID"
}
```

**响应对象 (`FindAllDoingDNSTasksResponse`)**

```json
{
  "dnsTasks": "[]DNSTask"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/DNSTaskService/findAllDoingDNSTasks" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---
