{
  "repo": "tidbcloud/devops",
  "binary": "migrate-proxy",
  "binary_path": "cmd/migrate-proxy/main.go",
  "surface_kind": "http_service",
  "type": "http_service",
  "extensions": {
    "notes": [
      "Requests are forwarded to proxy-addr over HTTPS by default, but requests under /api/v1/devops-internal are rewritten to internal-proxy-addr over HTTP.",
      "The proxy adds permissive CORS response headers before forwarding the request."
    ]
  },
  "services": [
    {
      "name": "MigrateProxyLifecycle",
      "package": "cmd/migrate-proxy",
      "methods": [
        {
          "name": "Startup",
          "name_key": "MigrateProxyLifecycle.Startup",
          "input": "listen-addr + proxy-addr + internal-proxy-addr flags",
          "output": "configured reverse proxy server",
          "type": "local"
        },
        {
          "name": "RegisterProxyHooks",
          "name_key": "MigrateProxyLifecycle.RegisterProxyHooks",
          "input": "goproxy server",
          "output": "request and response rewriting hooks",
          "type": "local"
        },
        {
          "name": "StartHTTPServer",
          "name_key": "MigrateProxyLifecycle.StartHTTPServer",
          "input": "listen address",
          "output": "running HTTP proxy listener",
          "type": "local"
        }
      ]
    },
    {
      "name": "MigrateProxyHTTP",
      "package": "cmd/migrate-proxy",
      "methods": [
        {
          "name": "ANY /*",
          "name_key": "Runtime MigrateProxyHTTP.ProxyAll",
          "input": "arbitrary HTTP request",
          "output": "proxied upstream response",
          "path": "/*",
          "type": "http"
        }
      ]
    }
  ]
}
