{
  "repo": "pingcap/dead-mans-switch",
  "binary": "dead-mans-switch",
  "binary_path": "main.go",
  "surface_kind": "mixed_service",
  "type": "mixed_service",
  "services": [
    {
      "name": "DeadMansSwitchLifecycle",
      "package": "main",
      "methods": [
        {
          "name": "Startup",
          "name_key": "Runtime DeadMansSwitchLifecycle.Startup",
          "input": "config path flag and process environment",
          "output": "HTTP server on :8080 and background dead-mans-switch loop",
          "type": "local"
        }
      ]
    },
    {
      "name": "HTTPServer",
      "type": "http",
      "methods": [
        {
          "name": "GET /metrics",
          "name_key": "HTTP GET /metrics",
          "input": "Prometheus scrape request",
          "output": "Prometheus metrics",
          "path": "/metrics",
          "type": "http"
        },
        {
          "name": "POST /webhook",
          "name_key": "HTTP POST /webhook",
          "input": "Alertmanager webhook payload",
          "output": "HTTP 200 after evaluation enqueue",
          "path": "/webhook",
          "type": "http"
        },
        {
          "name": "GET /health",
          "name_key": "HTTP GET /health",
          "input": "none",
          "output": "Ok!",
          "path": "/health",
          "type": "http"
        }
      ]
    }
  ],
  "extensions": {
    "notes": [
      "The service is a single Go binary built as dms and deployed as a long-running webhook service.",
      "The main loop consumes Alertmanager Watchdog events from /webhook and sends PagerDuty notifications when evaluation fails or heartbeats stop."
    ]
  }
}
