{
  "repo": "tidbcloud/metrics-server",
  "binary": "central_metrics",
  "binary_path": "cmd/central_metrics/main.go",
  "surface_kind": "mixed_service",
  "type": "mixed_service",
  "services": [
    {
      "name": "CentralMetricsLifecycle",
      "package": "main",
      "methods": [
        {
          "name": "Startup",
          "name_key": "Runtime CentralMetricsLifecycle.Startup",
          "input": "config-path",
          "output": "running gRPC server + HTTP gateway + alert webhook server",
          "type": "local"
        }
      ]
    },
    {
      "name": "ClusterService",
      "package": "central",
      "methods": [
        {"name": "CreateMetricsKey", "name_key": "ClusterService.CreateMetricsKey", "input": "CreateMetricsKeyReq", "output": "CreateMetricsKeyResp"},
        {"name": "GetAllMetricsKey", "name_key": "ClusterService.GetAllMetricsKey", "input": "GetAllMetricsKeyReq", "output": "GetAllMetricsKeyResp"},
        {"name": "DeleteMetricsKey", "name_key": "ClusterService.DeleteMetricsKey", "input": "DeleteMetricsKeyReq", "output": "Empty"}
      ]
    },
    {
      "name": "IntegrationService",
      "package": "central",
      "methods": [
        {"name": "CreateIntegration", "name_key": "IntegrationService.CreateIntegration", "input": "IntegrationCreateReq", "output": "IntegrationStatusResp"},
        {"name": "DeleteIntegration", "name_key": "IntegrationService.DeleteIntegration", "input": "IntegrationDeleteReq", "output": "IntegrationStatusResp"},
        {"name": "ListIntegrations", "name_key": "IntegrationService.ListIntegrations", "input": "IntegrationListReq", "output": "IntegrationListResp"},
        {"name": "ValidateDatadogAPIKey", "name_key": "IntegrationService.ValidateDatadogAPIKey", "input": "IntegrationDatadogValidateReq", "output": "IntegrationDatadogValidateResp"},
        {"name": "ValidateNewrelicAPIKey", "name_key": "IntegrationService.ValidateNewrelicAPIKey", "input": "IntegrationNewrelicValidateReq", "output": "IntegrationNewrelicValidateResp"}
      ]
    },
    {
      "name": "UserAlertService",
      "package": "central",
      "methods": [
        {"name": "SubscribeUserAlert", "name_key": "UserAlertService.SubscribeUserAlert", "input": "SubscribeUserAlertReq", "output": "SubscribeUserAlertResp"},
        {"name": "UnsubscribeUserAlert", "name_key": "UserAlertService.UnsubscribeUserAlert", "input": "UnsubscribeUserAlertReq", "output": "UnsubscribeUserAlertResp"},
        {"name": "GetUserAlertList", "name_key": "UserAlertService.GetUserAlertList", "input": "GetUserAlertListReq", "output": "GetUserAlertListResp"}
      ]
    },
    {
      "name": "HTTPGateway",
      "type": "http",
      "methods": [
        {"name": "GET /healthz", "name_key": "HTTP GET /healthz", "input": "none", "output": "200 OK"},
        {"name": "GET /version", "name_key": "HTTP GET /version", "input": "none", "output": "versionInfo"},
        {"name": "GET /metrics", "name_key": "HTTP GET /metrics", "input": "none", "output": "Prometheus metrics"},
        {"name": "POST /api/useralerts/v1/alert", "name_key": "HTTP POST /api/useralerts/v1/alert", "input": "template.Data", "output": "200 OK"},
        {"name": "POST /api/useralerts/v1/alert-webhook", "name_key": "HTTP POST /api/useralerts/v1/alert-webhook", "input": "template.Data", "output": "200 OK"}
      ]
    }
  ],
  "extensions": {}
}
