Files
pyGoEdge-UserPanel/reference/goedge 文档/SysLockerService.md
2025-11-18 03:36:49 +08:00

76 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# SysLockerService
> 互斥锁管理
---
## SysLockerLock
> 获得锁
- 角色:`admin`
- HTTP`POST https://backend.dooki.cloud/SysLockerService/SysLockerLock`
- RPC`rpc SysLockerLock (SysLockerLockRequest) returns (SysLockerLockResponse);`
**请求对象 (`SysLockerLockRequest`)**
```json
{
"key": "string",
"timeoutSeconds": "int64"
}
```
**响应对象 (`SysLockerLockResponse`)**
```json
{
"ok": "bool"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/SysLockerService/SysLockerLock" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## SysLockerUnlock
> 释放锁
- 角色:`admin`
- HTTP`POST https://backend.dooki.cloud/SysLockerService/SysLockerUnlock`
- RPC`rpc SysLockerUnlock (SysLockerUnlockRequest) returns (RPCSuccess);`
**请求对象 (`SysLockerUnlockRequest`)**
```json
{
"key": "string"
}
```
**响应对象 (`RPCSuccess`)**
```json
{}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/SysLockerService/SysLockerUnlock" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---