{
  "repo": "tidbcloud/aws-shared-provider",
  "binary": "tidb-gateway",
  "binary_path": "cmd/tidb-gateway/main.go",
  "dependencies": {
    "HTTP GET /healthz": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /readyz": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /metrics": {
      "infrastructure": {},
      "services": []
    },
    "Runtime SQLProxy.Accept": {
      "infrastructure": {
        "redis": {
          "conditions": ["Always"],
          "operations": [
            {
              "operation": "SUBSCRIBE",
              "trigger": "Consume cluster info from Redis stream",
              "conditions": ["Always"],
              "implementation": "consumerredis.Consumer consuming from infra-cluster-table stream"
            }
          ]
        },
        "dynamodb": {
          "conditions": ["CloudProviderType == AWS"],
          "operations": [
            {
              "operation": "GET",
              "trigger": "Fetch cluster metadata from DynamoDB",
              "conditions": ["Always"],
              "implementation": "infradynamo.NewDynamoClient.Get"
            }
          ]
        },
        "tablestore": {
          "conditions": ["CloudProviderType == AliCloud"],
          "operations": [
            {
              "operation": "GET",
              "trigger": "Fetch cluster metadata from TableStore",
              "conditions": ["Always"],
              "implementation": "infraots.NewTableStoreClient.Get"
            }
          ]
        },
        "mysql": {
          "conditions": ["enableInfraMysqlClient == true"],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Fetch cluster metadata from MySQL",
              "conditions": ["infraRdsSecretArn configured"],
              "implementation": "inframysql.NewMySQLClient"
            }
          ]
        }
      },
      "services": [
        {
          "name": "kubernetes-api",
          "target_interface": "GET /api/v1/namespaces/{ns}/pods",
          "operation_type": "http_get",
          "conditions": ["Always"],
          "operations": [
            {
              "operation": "Watch TiDB pods",
              "trigger": "Monitor backend TiDB pods via infra kubeconfig",
              "conditions": ["Always"],
              "implementation": "infraApi localKube client"
            }
          ]
        },
        {
          "name": "manager-server",
          "target_interface": "ManagerService.GetClusterInfo",
          "operation_type": "grpc_unary",
          "conditions": ["Always"],
          "operations": [
            {
              "operation": "gRPC GetClusterInfo",
              "trigger": "Fetch cluster routing info from manager",
              "conditions": ["Always"],
              "implementation": "grpc.Dial dns:///manager-server:8000"
            }
          ]
        },
        {
          "name": "tidb-server",
          "target_interface": "MySQL Protocol",
          "operation_type": "tcp",
          "conditions": ["Always"],
          "operations": [
            {
              "operation": "Connect to TiDB",
              "trigger": "Proxy MySQL connections to backend TiDB",
              "conditions": ["Always"],
              "implementation": "tiproxy SQLServer proxy to backend TiDB"
            }
          ]
        }
      ]
    }
  }
}
