{
  "repo": "tidbcloud/cluster-service-ng",
  "binary": "autoscale_stub",
  "binary_path": "cmd/autoscale_stub/main.go",
  "surface_kind": "mixed_service",
  "type": "service",
  "services": [
    {
      "name": "CustomMetricsAdapter",
      "package": "cmd/autoscale_stub",
      "methods": [
        {
          "name": "GetMetric",
          "name_key": "CustomMetricsAdapter.GetMetric",
          "input": "custom.metrics.k8s.io or external.metrics.k8s.io requests",
          "output": "calculated HPA metric values"
        }
      ]
    },
    {
      "name": "AutoscaleApp",
      "package": "cmd/autoscale_stub",
      "methods": [
        {
          "name": "Run",
          "name_key": "AutoscaleApp.Run",
          "input": "/etc/ng_autoscaler/config.yaml and scaler configuration",
          "output": "background autoscale evaluation loop"
        }
      ]
    }
  ],
  "extensions": {
    "notes": [
      "Serves Kubernetes custom.metrics.k8s.io/v1beta1 and external.metrics.k8s.io/v1beta1 endpoints for HPA autoscaling.",
      "Runs a background autoscale loop when /etc/ng_autoscaler/config.yaml defines clusterScalers."
    ]
  }
}
