consul/agent/hcp/client
Melissa Kam c112a6632d
[CC-7042] Update and enable the HCP metrics sink in the HCP manager (#20072)
* Option to set HCP client at runtime

Allows us to initially set a nil HCP client for the
telemetry provider and update it later.

* Set telemetry provider HCP client in HCP manager

Set the telemetry provider as a dependency and pass it to
the manager. Update the telemetry provider's HCP client
when the HCP manager starts.

* Add a provider interface for the metrics client

This provider will allow us to configure and reconfigure the
retryable HTTP client and the headers for the metrics client.

* Move HTTP retryable client to separate file

Copied directly from the metrics client.

* Abstract HCP specific values in HTTP client

Remove HCP specific references and instead initiate with
a generic TLS configuration and authentication source.

* Set up HTTP client and headers in the provider

Move setup from the metrics client to the HCP telemetry
provider.

* Update the telemetry provider in the HCP manager

Initialize the provider without the HCP configs and then update
it in the HCP manager to enable it.

* Improve test assertion, fix method comment

* Move client provider to metrics client

* Stop the manager on setup error

* Add separate lock for http configuration

* Start telemetry provider in HCP manager

* Update HCP client and config as part of Run

* Remove option to set config at initialization

* Simplify and clean up setting HCP configs

* Add test for telemetry provider Run method

* Fix race condition

* Use clone of HTTP headers

* Only allow initial update and run once
2024-01-16 10:46:12 -06:00
..
client.go [Cloud][CC-6925] Updates to pushing server state (#19682) 2023-12-04 10:25:18 -05:00
client_test.go [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
http_client.go [CC-7042] Update and enable the HCP metrics sink in the HCP manager (#20072) 2024-01-16 10:46:12 -06:00
http_client_test.go [CC-7042] Update and enable the HCP metrics sink in the HCP manager (#20072) 2024-01-16 10:46:12 -06:00
metrics_client.go [CC-7042] Update and enable the HCP metrics sink in the HCP manager (#20072) 2024-01-16 10:46:12 -06:00
metrics_client_test.go [CC-7042] Update and enable the HCP metrics sink in the HCP manager (#20072) 2024-01-16 10:46:12 -06:00
mock_Client.go HCP Telemetry Feature (#17460) 2023-05-29 16:11:08 -04:00
telemetry_config.go [HCP Telemetry] Move first TelemetryConfig Fetch into the TelemetryConfigProvider (#18318) 2023-08-30 13:25:26 -04:00
telemetry_config_test.go [HCP Telemetry] Move first TelemetryConfig Fetch into the TelemetryConfigProvider (#18318) 2023-08-30 13:25:26 -04:00