{
  "repo": "tidbcloud/core-portal",
  "binary": "health-checker",
  "binary_path": "cmd/health-checker/main.go",
  "surface_kind": "http_service",
  "type": "http_service",
  "extensions": {},
  "services": [
    {
      "name": "HealthCheckerLifecycle",
      "type": "lifecycle",
      "methods": [
        {
          "name": "ParseFlags",
          "name_key": "HealthCheckerLifecycle.ParseFlags",
          "description": "Parse the allowed source CIDR used to guard the state-changing handlers."
        },
        {
          "name": "InitAllowSubnet",
          "name_key": "HealthCheckerLifecycle.InitAllowSubnet",
          "description": "Parse the configured allow-cidr into an IP subnet and fail fast when it is invalid."
        },
        {
          "name": "StartHTTPServer",
          "name_key": "HealthCheckerLifecycle.StartHTTPServer",
          "description": "Register the health, toggle, and down handlers and start the HTTP server on :8080."
        }
      ]
    },
    {
      "name": "HealthCheckerHTTP",
      "type": "http",
      "methods": [
        {
          "name": "Healthz",
          "name_key": "HealthCheckerHTTP.Healthz",
          "method": "GET",
          "path": "/healthz",
          "description": "Return the current in-memory health state."
        },
        {
          "name": "Toggle",
          "name_key": "HealthCheckerHTTP.Toggle",
          "method": "GET",
          "path": "/toggle",
          "description": "Toggle the in-memory health state when the caller IP is allowed."
        },
        {
          "name": "Down",
          "name_key": "HealthCheckerHTTP.Down",
          "method": "GET",
          "path": "/down",
          "description": "Force the in-memory health state to unhealthy when the caller IP is allowed."
        }
      ]
    }
  ]
}
