{
  "repo": "pingcap/tidb-operator",
  "binary": "prestop-checker",
  "binary_path": "cmd/prestop-checker/main.go",
  "surface_kind": "worker_service",
  "type": "worker_service",
  "services": [
    {
      "name": "PrestopCheckerLifecycle",
      "package": "cmd/prestop-checker",
      "methods": [
        {
          "name": "ParseFlags",
          "name_key": "Runtime PrestopCheckerLifecycle.ParseFlags",
          "input": "pd, addr, ca, cert, and key flags",
          "output": "parsed PD target, store address, and TLS-related variables",
          "type": "local"
        },
        {
          "name": "LoadTLSConfig",
          "name_key": "Runtime PrestopCheckerLifecycle.LoadTLSConfig",
          "input": "ca, cert, and key file paths",
          "output": "client TLS config for PD HTTPS requests",
          "type": "local"
        },
        {
          "name": "ResolveStoreID",
          "name_key": "Runtime PrestopCheckerLifecycle.ResolveStoreID",
          "input": "PD client and TiKV advertised address",
          "output": "store ID corresponding to the terminating TiKV pod",
          "type": "local"
        },
        {
          "name": "WaitForLeaderEviction",
          "name_key": "Runtime PrestopCheckerLifecycle.WaitForLeaderEviction",
          "input": "PD client and resolved store ID",
          "output": "process exits successfully only after leader count reaches zero",
          "type": "local"
        }
      ]
    }
  ],
  "extensions": {
    "notes": [
      "This binary is a lifecycle hook helper, not an HTTP or gRPC service.",
      "Source contains a real flag-binding bug: --ca, --cert, and --key are all wired into the addr variable instead of ca/cert/key."
    ]
  }
}
