Skip to content

Conversation

@ljluestc
Copy link

When a comma-separated list of hosts is provided in the host field (e.g., host1,host2), the provider will now attempt to connect to each host in sequence until a successful connection is established or the timeout is reached.

Changes

  • postgresql/proxy_driver.go: Updated the custom proxyDriver to intercept connection attempts.
    • Added parseAddress helper to handle comma-separated hosts and IPv6 addresses.
    • Modified DialTimeout to iterate through the list of hosts.
  • postgresql/proxy_driver_test.go: Added unit tests to verify address parsing logic for various formats (single host, multiple hosts, IPv6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant