{
  "repo": "tidbcloud/aws-shared-provider",
  "binary": "meta-server",
  "binary_path": "cmd/meta-server/main.go",
  "surface_kind": "mixed_service",
  "type": "mixed_service",
  "extensions": {},
  "services": [
    {
      "name": "MetaServerLifecycle",
      "type": "lifecycle",
      "methods": [
        {
          "name": "LoadFlags",
          "name_key": "MetaServerLifecycle.LoadFlags",
          "description": "Parse meta-server startup flags such as etcd endpoints, TLS files, address, cloud provider, and regional metadata options."
        },
        {
          "name": "InitTLSConfig",
          "name_key": "MetaServerLifecycle.InitTLSConfig",
          "description": "Build the TLS config used by the etcd client."
        },
        {
          "name": "BuildStorage",
          "name_key": "MetaServerLifecycle.BuildStorage",
          "description": "Create the memdb-backed storage that connects to etcd and optionally infra MySQL."
        },
        {
          "name": "StartStorage",
          "name_key": "MetaServerLifecycle.StartStorage",
          "description": "Warm the in-memory keyspace and cluster caches and start background watchers."
        },
        {
          "name": "StartupHTTP",
          "name_key": "MetaServerLifecycle.StartupHTTP",
          "description": "Register HTTP handlers, bind the TCP listener, and start serving requests."
        }
      ]
    },
    {
      "name": "MetaAPI",
      "type": "http",
      "base_path": "/api",
      "methods": [
        {
          "name": "LookupKeyspace",
          "name_key": "MetaAPI.LookupKeyspace",
          "method": "ANY",
          "path": "/api/v1/meta",
          "description": "Look up enabled keyspace metadata by one supported index."
        },
        {
          "name": "ListKeyspaces",
          "name_key": "MetaAPI.ListKeyspaces",
          "method": "ANY",
          "path": "/api/v1/meta:list",
          "description": "List enabled keyspace metadata, optionally with pagination."
        },
        {
          "name": "LookupCluster",
          "name_key": "MetaAPI.LookupCluster",
          "method": "ANY",
          "path": "/api/v1/clusters",
          "description": "Look up cluster metadata by one supported cluster index."
        },
        {
          "name": "ListClusterEvents",
          "name_key": "MetaAPI.ListClusterEvents",
          "method": "ANY",
          "path": "/api/v1/events",
          "description": "List cluster events after a given last_event_id."
        },
        {
          "name": "LookupKeyspaceV2",
          "name_key": "MetaAPI.LookupKeyspaceV2",
          "method": "ANY",
          "path": "/api/v2/meta",
          "description": "Look up keyspace metadata without restricting to enabled state."
        },
        {
          "name": "ListKeyspacesV2",
          "name_key": "MetaAPI.ListKeyspacesV2",
          "method": "ANY",
          "path": "/api/v2/meta:list",
          "description": "List keyspace metadata in any state, optionally with pagination."
        }
      ]
    },
    {
      "name": "MetaStoreWatcher",
      "type": "worker",
      "methods": [
        {
          "name": "WatchKeyspaceChanges",
          "name_key": "MetaStoreWatcher.WatchKeyspaceChanges",
          "description": "Watch keyspace metadata changes in etcd and keep the in-memory store updated."
        },
        {
          "name": "WatchClusterChanges",
          "name_key": "MetaStoreWatcher.WatchClusterChanges",
          "description": "Poll infra MySQL cluster events and keep the in-memory cluster cache updated."
        }
      ]
    }
  ]
}
