refactor: use heartbeat endpoint consistently
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
客户端调用:
|
||||
|
||||
- `POST /monitor/server/heartbeat-v2`
|
||||
- `POST /monitor/server/heartbeat`
|
||||
- Header: `X-API-Key`
|
||||
|
||||
## 项目结构
|
||||
@@ -66,7 +66,7 @@ HarborForge.Monitor/
|
||||
|
||||
### MONITOR_PORT — 插件桥接端口
|
||||
|
||||
当 `MONITOR_PORT` (或 `monitorPort`) 设置为大于 0 的值时,Monitor 会在 `127.0.0.1:<MONITOR_PORT>` 上启动一个本地 HTTP 服务,供 HarborForge OpenClaw 插件查询遥测数据。
|
||||
当 `MONITOR_PORT` 设置为大于 0 的值时,Monitor 会在 `127.0.0.1:<MONITOR_PORT>` 上启动一个本地 HTTP 服务,供 HarborForge OpenClaw 插件查询遥测数据。
|
||||
|
||||
支持的端点:
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ func Send(ctx context.Context, client *http.Client, cfg config.Config, payload P
|
||||
return fmt.Errorf("marshal payload: %w", err)
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, http.MethodPost, strings.TrimRight(cfg.BackendURL, "/")+"/monitor/server/heartbeat-v2", strings.NewReader(string(body)))
|
||||
req, err := http.NewRequestWithContext(ctx, http.MethodPost, strings.TrimRight(cfg.BackendURL, "/")+"/monitor/server/heartbeat", strings.NewReader(string(body)))
|
||||
if err != nil {
|
||||
return fmt.Errorf("build request: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user