流式生成编译或 Kubernetes 调度日志

GET/fake-logs
公开访问

使用 kind=build 或 kind=k8s 选择模拟场景。首行立即发送,后续行以 interval 毫秒为间隔。使用 curl -N 禁用输出缓冲。 访问类别:匿名 API,可携带 Token 使用独立额度

请求参数

kindquery
string · 默认值:"build" · 可选:build、k8s
linesquery
integer · 默认值:12 · 最小值:1 · 最大值:60
intervalquery
integer · 默认值:350 · 最小值:50 · 最大值:500

响应

text/plain

{
  "type": "string"
}

响应示例

成功响应

curl -NsS 'https://oit.sh/fake-logs?lines=4'
HTTP 200
content-type: text/plain; charset=utf-8
content-encoding: gzip
cache-control: no-store

[1/4] BUILD resolve dependencies
[2/4] BUILD compile source
[3/4] BUILD bundle assets
[4/4] BUILD build completed

错误示例

curl -NsS 'https://oit.sh/fake-logs?kind=invalid+value&lines=4&interval=350'
HTTP 400
content-type: application/json
content-encoding: gzip
cache-control: no-store

{
  "error": {
    "code": "INVALID_INPUT",
    "message": "参数无效",
    "issues": [
      {
        "location": "query",
        "field": "kind",
        "code": "invalid_value",
        "message": "允许值:build、k8s"
      }
    ]
  }
}

在线调试

Ctrl / ⌘ + Enter
curl -X GET 'https://oit.sh/fake-logs'

响应

等待请求

等待发送请求