GET /admin/cells

列出所有 Cell。

GET /admin/cells

查询参数

无。


curl 示例

curl -s "http://localhost:9091/admin/cells" \
  -H "Authorization: Bearer $ADMIN_TOKEN" | jq .

响应

200 OK

{
  "cells": [
    {
      "id": "dept-legal",
      "state": "Warm",
      "created_at": "2026-09-01T00:00:00Z"
    },
    {
      "id": "dept-audit",
      "state": "Hot",
      "created_at": "2026-09-01T00:00:00Z"
    },
    {
      "id": "dept-sales",
      "state": "Cool",
      "created_at": "2026-09-10T00:00:00Z"
    },
    {
      "id": "dept-hr",
      "state": "Cold",
      "created_at": "2026-09-15T00:00:00Z"
    }
  ]
}

CellSummary 字段说明:

字段类型说明
idstringCell 唯一标识
statestring温度状态:Hot(有活跃 Run)/ Warm(DB 在内存)/ Cool(仅磁盘)/ Cold(已停止)
created_atstring创建时间(RFC 3339)

温度状态说明:

状态含义激活成本
Hot有活跃 Run 正在执行0
Warmgoroutine 和 DB 连接在内存中0
Cool磁盘保留,无 goroutine100–500ms
Cold已停止1–3s

错误码

HTTP错误说明
401—未认证或 Token 无效
403—非 Admin Token

相关端点