{
  "repo": "tidbcloud/metering",
  "binary": "supplementary",
  "binary_path": "cmd/supplementary/main.go",
  "dependencies": {
    "CLI supplementary": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when PreparePhase uses SourceMysql"
          ],
          "operations": [
            {
              "operation": "LOAD METERING FROM MYSQL",
              "trigger": "Backfill metering data from the configured MySQL source",
              "conditions": [
                "serviceConfig.Phase == PreparePhase and SourceMysql is not empty"
              ],
              "implementation": "LoadMeteringFromMysql in cmd/supplementary/main.go"
            }
          ]
        },
        "object_storage": {
          "conditions": [
            "Either PreparePhase without SourceMysql or RepushPhase"
          ],
          "operations": [
            {
              "operation": "LOAD OR REPUSH OBJECT STORAGE DATA",
              "trigger": "Backfill or repush metering artifacts through object storage",
              "conditions": [
                "The selected phase reaches object-storage code paths"
              ],
              "implementation": "LoadMeteringFromObjectStorage / Repush in cmd/supplementary/main.go"
            }
          ]
        }
      },
      "services": []
    }
  }
}
