Skip to content

feat: add support for --failover-period flag - #2690

Open
yuhuayang-google wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
yuhuayang-google:fix-2386-failover-period
Open

yuhuayang-google wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
yuhuayang-google:fix-2386-failover-period

Conversation

@yuhuayang-google

Copy link
Copy Markdown

Fixes #2386

Description

This PR adds support for configuring the DNS failover period on the Go Connector via a new --failover-period flag and matching environment variable CSQL_PROXY_FAILOVER_PERIOD.

  • Adds FailoverPeriod *time.Duration to proxy.Config
  • Configures cloudsqlconn.WithFailoverPeriod when set in DialerOptions
  • Adds --failover-period CLI flag defaulting to 30s (when set to 0, DNS polling is disabled)
  • Adds WithFailoverPeriod(d time.Duration) Option helper function
  • Updates CLI documentation via gendocs
  • Adds unit tests in cmd and internal/proxy

@yuhuayang-google
yuhuayang-google requested a review from a team as a code owner September 29, 2026 19:26
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.

Add support for --failover-period flag

2 participants