{
  "repo": "tidbcloud/aws-shared-provider",
  "binary": "ops-service",
  "binary_path": "cmd/ops-service/main.go",
  "surface_kind": "mixed_service",
  "type": "mixed_service",
  "extensions": {},
  "services": [
    {
      "name": "OpsServiceLifecycle",
      "type": "lifecycle",
      "methods": [
        {
          "name": "LoadFlags",
          "name_key": "OpsServiceLifecycle.LoadFlags",
          "description": "Parse ops-service startup flags such as server address, TLS files, Lark webhook, and cron expression."
        },
        {
          "name": "BuildKubeConfig",
          "name_key": "OpsServiceLifecycle.BuildKubeConfig",
          "description": "Build kubeconfig from the startup kubeconfig flag and tune its client QPS and burst."
        },
        {
          "name": "InitKubernetesClients",
          "name_key": "OpsServiceLifecycle.InitKubernetesClients",
          "description": "Construct the Kubernetes clientset and dynamic client used by the ops HTTP handlers."
        },
        {
          "name": "InitTLSCertificate",
          "name_key": "OpsServiceLifecycle.InitTLSCertificate",
          "description": "Load the TLS certificate pair used by the HTTPS server."
        },
        {
          "name": "InitLarkConfig",
          "name_key": "OpsServiceLifecycle.InitLarkConfig",
          "description": "Initialize the optional Lark bot webhook configuration."
        },
        {
          "name": "StartDailyImageReportScheduler",
          "name_key": "OpsServiceLifecycle.StartDailyImageReportScheduler",
          "description": "Start the background daily image report scheduler with etcd-based leadership."
        },
        {
          "name": "StartupHTTP",
          "name_key": "OpsServiceLifecycle.StartupHTTP",
          "description": "Register HTTP handlers and start the TLS HTTP server."
        }
      ]
    },
    {
      "name": "OpsAPI",
      "type": "http",
      "base_path": "/ops/api/v1",
      "methods": [
        {
          "name": "Health",
          "name_key": "OpsAPI.Health",
          "method": "ANY",
          "path": "/ops/api/v1/health",
          "description": "Basic health probe for ops-service."
        },
        {
          "name": "UpdateGatewayHPAMinReplicas",
          "name_key": "OpsAPI.UpdateGatewayHPAMinReplicas",
          "method": "ANY",
          "path": "/ops/api/v1/update_gateway_hpa_min_replicas",
          "description": "Update the minimum replicas for a gateway HPA or its backing Gateway CRD."
        },
        {
          "name": "ListGatewayHPAMinReplicas",
          "name_key": "OpsAPI.ListGatewayHPAMinReplicas",
          "method": "ANY",
          "path": "/ops/api/v1/gateway_hpa_min_replicas",
          "description": "List gateway HPA min/max/desired replica information."
        },
        {
          "name": "UpdateTiDBAutoscalingThreshold",
          "name_key": "OpsAPI.UpdateTiDBAutoscalingThreshold",
          "method": "ANY",
          "path": "/ops/api/v1/update_tidb_autoscaling_threshold",
          "description": "Update the avgValue of one metric entry in the tidb-autoscaling CR."
        },
        {
          "name": "ListTiDBAutoscalingThreshold",
          "name_key": "OpsAPI.ListTiDBAutoscalingThreshold",
          "method": "ANY",
          "path": "/ops/api/v1/tidb_autoscaling_threshold",
          "description": "List tidb-autoscaling CR thresholds across namespaces."
        },
        {
          "name": "GetComponentImage",
          "name_key": "OpsAPI.GetComponentImage",
          "method": "ANY",
          "path": "/ops/api/v1/component_image",
          "description": "Read the current image of a configured component from Kubernetes resources."
        },
        {
          "name": "TriggerImageReport",
          "name_key": "OpsAPI.TriggerImageReport",
          "method": "ANY",
          "path": "/ops/api/v1/trigger_image_report",
          "description": "Trigger the component image report asynchronously."
        }
      ]
    },
    {
      "name": "ImageReportScheduler",
      "type": "worker",
      "methods": [
        {
          "name": "ReportTiDBImageDaily",
          "name_key": "ImageReportScheduler.ReportTiDBImageDaily",
          "description": "Collect component images from Kubernetes and optionally send the report to the configured Lark bot."
        }
      ]
    }
  ]
}
