{
  "repo": "tidbcloud/dataservices",
  "binary": "tools",
  "binary_path": "cmd/tools/main.go",
  "surface_kind": "cli_tool",
  "type": "cli_tool",
  "extensions": {
    "notes": [
      "This binary is a flag-driven ETL command, not a deployed HTTP or gRPC service.",
      "Runtime branching is controlled entirely by --job_type."
    ]
  },
  "services": [
    {
      "name": "ToolsLifecycle",
      "package": "cmd/tools",
      "methods": [
        {
          "name": "LoadConfigAndDatabase",
          "name_key": "ToolsLifecycle.LoadConfigAndDatabase",
          "input": "config_path, job_type, start_date, end_date, and MySQL connection settings",
          "output": "global config initialized and MySQL connection established",
          "type": "local"
        },
        {
          "name": "StartTracing",
          "name_key": "ToolsLifecycle.StartTracing",
          "input": "component name etl-tools",
          "output": "Jaeger tracer provider and OpenTelemetry span initialized",
          "type": "local"
        },
        {
          "name": "RunEtlHourJob",
          "name_key": "ToolsLifecycle.RunEtlHourJob",
          "input": "start_date and end_date converted to hourly timestamps",
          "output": "hourly ETL jobs executed across the requested time range",
          "type": "local"
        },
        {
          "name": "RunEtlDayJob",
          "name_key": "ToolsLifecycle.RunEtlDayJob",
          "input": "start_date and end_date converted to daily timestamps",
          "output": "daily ETL jobs executed across the requested time range",
          "type": "local"
        }
      ]
    }
  ]
}
