{
  "repo": "tidbcloud/dataservices",
  "binary": "dataapi_control",
  "binary_path": "cmd/dataapi_control/main.go",
  "surface_kind": "mixed_service",
  "type": "mixed_service",
  "extensions": {
    "notes": [
      "This binary is a regional inner-control HTTP service with a second metrics listener.",
      "Kubernetes client bootstrap prefers in-cluster config and only falls back to --master/--kube-config or ~/.kube/config outside the cluster."
    ]
  },
  "services": [
    {
      "name": "DataAPIControlLifecycle",
      "package": "cmd/dataapi_control",
      "methods": [
        {
          "name": "BuildKubernetesConfig",
          "name_key": "DataAPIControlLifecycle.BuildKubernetesConfig",
          "input": "master, kube-config, in-cluster config, and fallback ~/.kube/config",
          "output": "Kubernetes REST config for control-plane clients",
          "type": "local"
        },
        {
          "name": "InitControlClients",
          "name_key": "DataAPIControlLifecycle.InitControlClients",
          "input": "Kubernetes REST config, Redis config, CustomLogQuery config, DataAppMetricsQuery config, and DynamoDB config",
          "output": "control server dependencies initialized",
          "type": "local"
        },
        {
          "name": "StartDdbCacheWorker",
          "name_key": "DataAPIControlLifecycle.StartDdbCacheWorker",
          "input": "worker manager with ddbcache syncer",
          "output": "background worker manager processing ddb cache sync jobs",
          "type": "background_worker"
        },
        {
          "name": "StartTracing",
          "name_key": "DataAPIControlLifecycle.StartTracing",
          "input": "component name dataservices-dataapi-control",
          "output": "Jaeger tracer provider initialized",
          "type": "local"
        },
        {
          "name": "InitHttpServer",
          "name_key": "DataAPIControlLifecycle.InitHttpServer",
          "input": "AWS and VPC config",
          "output": "private-link and custom-domain control server initialized",
          "type": "local"
        },
        {
          "name": "StartHttpServer",
          "name_key": "DataAPIControlLifecycle.StartHttpServer",
          "input": "HTTP port from config",
          "output": "inner control HTTP server exposing /inner/dataservice routes plus /healthz",
          "type": "local"
        },
        {
          "name": "StartMetricsServer",
          "name_key": "DataAPIControlLifecycle.StartMetricsServer",
          "input": "metrics port from config",
          "output": "HTTP metrics listener exposing /metrics",
          "type": "background_worker"
        }
      ]
    },
    {
      "name": "DataAPIControlHTTP",
      "package": "api",
      "type": "http",
      "methods": [
        {"name": "GET /healthz", "name_key": "HTTP GET /healthz", "path": "/healthz", "http_method": "GET", "input": "none", "output": "HTTP 200", "type": "http"},
        {"name": "POST /inner/dataservice/projects/:project_id/clusters/:cluster_id/privatelink/create", "name_key": "HTTP POST /inner/dataservice/projects/:project_id/clusters/:cluster_id/privatelink/create", "path": "/inner/dataservice/projects/:project_id/clusters/:cluster_id/privatelink/create", "http_method": "POST", "input": "private-link create request", "output": "private-link create response", "type": "http"},
        {"name": "POST /inner/dataservice/projects/:project_id/clusters/:cluster_id/privatelink/delete", "name_key": "HTTP POST /inner/dataservice/projects/:project_id/clusters/:cluster_id/privatelink/delete", "path": "/inner/dataservice/projects/:project_id/clusters/:cluster_id/privatelink/delete", "http_method": "POST", "input": "private-link delete request", "output": "private-link delete response", "type": "http"},
        {"name": "POST /inner/dataservice/apps/:app_id/custom-domains", "name_key": "HTTP POST /inner/dataservice/apps/:app_id/custom-domains", "path": "/inner/dataservice/apps/:app_id/custom-domains", "http_method": "POST", "input": "custom domain create request", "output": "custom domain create response", "type": "http"},
        {"name": "POST /inner/dataservice/apps/:app_id/custom-domains/:host/getState", "name_key": "HTTP POST /inner/dataservice/apps/:app_id/custom-domains/:host/getState", "path": "/inner/dataservice/apps/:app_id/custom-domains/:host/getState", "http_method": "POST", "input": "custom domain state request", "output": "custom domain state response", "type": "http"},
        {"name": "POST /inner/dataservice/apps/:app_id/custom-domains/:host/delete", "name_key": "HTTP POST /inner/dataservice/apps/:app_id/custom-domains/:host/delete", "path": "/inner/dataservice/apps/:app_id/custom-domains/:host/delete", "http_method": "POST", "input": "custom domain delete request", "output": "custom domain delete response", "type": "http"},
        {"name": "POST /inner/dataservice/apps/:app_id/dataapp-log/query", "name_key": "HTTP POST /inner/dataservice/apps/:app_id/dataapp-log/query", "path": "/inner/dataservice/apps/:app_id/dataapp-log/query", "http_method": "POST", "input": "dataapp log query request", "output": "execution log query response", "type": "http"},
        {"name": "POST /inner/dataservice/apps/:app_id/dataapp-log/download", "name_key": "HTTP POST /inner/dataservice/apps/:app_id/dataapp-log/download", "path": "/inner/dataservice/apps/:app_id/dataapp-log/download", "http_method": "POST", "input": "download task request", "output": "download task submission response", "type": "http"},
        {"name": "POST /inner/dataservice/apps/:app_id/dataapp-metrics/query", "name_key": "HTTP POST /inner/dataservice/apps/:app_id/dataapp-metrics/query", "path": "/inner/dataservice/apps/:app_id/dataapp-metrics/query", "http_method": "POST", "input": "dataapp metrics query request", "output": "dataapp metrics query response", "type": "http"}
      ]
    }
  ]
}
