{
  "repo": "tidbcloud/dataservices",
  "binary": "regioncentral",
  "binary_path": "cmd/regioncentral/main.go",
  "surface_kind": "mixed_service",
  "type": "mixed_service",
  "extensions": {
    "notes": [
      "This binary is gRPC plus a separate metrics listener; there is no public HTTP business router.",
      "The componentName is still set to dataservices-dataapi in source, so tracing/log metadata currently reuses the dataapi label."
    ]
  },
  "services": [
    {
      "name": "RegionCentralLifecycle",
      "package": "cmd/regioncentral",
      "methods": [
        {
          "name": "LoadConfigAndLogger",
          "name_key": "RegionCentralLifecycle.LoadConfigAndLogger",
          "input": "config-path and sentry config",
          "output": "global config initialized and logger/sentry configured",
          "type": "local"
        },
        {
          "name": "StartMetricsServer",
          "name_key": "RegionCentralLifecycle.StartMetricsServer",
          "input": "metrics port from config",
          "output": "HTTP metrics listener exposing /metrics",
          "type": "background_worker"
        },
        {
          "name": "StartTracing",
          "name_key": "RegionCentralLifecycle.StartTracing",
          "input": "component name dataservices-dataapi",
          "output": "Jaeger tracer provider initialized",
          "type": "local"
        },
        {
          "name": "InitApikeyEncrypter",
          "name_key": "RegionCentralLifecycle.InitApikeyEncrypter",
          "input": "DataApiKey secret key and iv",
          "output": "API key encrypter initialized",
          "type": "local"
        },
        {
          "name": "StartGrpcServer",
          "name_key": "RegionCentralLifecycle.StartGrpcServer",
          "input": "gRPC port from config",
          "output": "RegionCentralService gRPC server running",
          "type": "local"
        }
      ]
    },
    {
      "name": "RegionCentralHTTP",
      "package": "cmd/regioncentral",
      "type": "http",
      "methods": [
        {
          "name": "GET /metrics",
          "name_key": "HTTP GET /metrics",
          "path": "/metrics",
          "http_method": "GET",
          "input": "none",
          "output": "Prometheus metrics",
          "type": "http"
        }
      ]
    },
    {
      "name": "RegionCentralService",
      "package": "internal/controller/regioncentral",
      "type": "grpc",
      "methods": [
        {
          "name": "GetDataAPIAccess",
          "name_key": "RegionCentralService.GetDataAPIAccess",
          "input": "GetDataAPIAccessReq",
          "output": "GetDataAPIAccessResp",
          "type": "grpc"
        }
      ]
    }
  ]
}
