src/core/packages/elasticsearch/server-internal/README.md
This package contains the internal types and implementation for Core's server-side elasticsearch service.
The ElasticsearchService is one of the Core services (instantiated in @src/core/packages/root/server-internal/src/server.ts) that provides connectivity to Elasticsearch for Kibana.
It manages the lifecycle of Elasticsearch clients, ensures the connection is healthy and compatible, and exposes APIs for plugins to interact with Elasticsearch.
ClusterClient instances (e.g., data client), providing both internal-user and request-scoped access.esNodesCompatibility$) and calculates the overall service status (status$).elasticsearch.hosts, username/password or serviceAccountToken, etc.).AgentManager for HTTP agent reuse.CpsRequestHandler based on the cps.cpsEnabled flag. See @kbn/core-elasticsearch-client-server-internal — CPS Request Handler for full details.