TUN-8732: implement port selection algorithm

## Summary
Implements the discovery of the metrics server given an array of addresses (known addresses), tunnelID, and connectorID.

Closes TUN-8732
This commit is contained in:
Luis Neto
2024-12-03 04:07:55 -08:00
parent f884b29d0d
commit 65786597cc
3 changed files with 222 additions and 0 deletions

View File

@@ -19,4 +19,8 @@ var (
ErrNoVolumeFound = errors.New("no disk volume information found")
// Error user when the base url of the diagnostic client is not provided.
ErrNoBaseUrl = errors.New("no base url")
// Error used when no metrics server is found listening to the known addresses list (check [metrics.GetMetricsKnownAddresses])
ErrMetricsServerNotFound = errors.New("metrics server not found")
// Error used when multiple metrics server are found listening to the known addresses list (check [metrics.GetMetricsKnownAddresses])
ErrMultipleMetricsServerFound = errors.New("multiple metrics server found")
)