mirror of
https://github.com/coredns/coredns.git
synced 2026-10-17 07:45:42 -04:00
Brings clouddns to parity with route53, which already exposes a refresh directive to control how often zones are re-synced. clouddns currently hardcodes this to 1 minute (delay := 1 * time.Minute in Run) with no way to change it. Adds a refresh field to the CloudDNS struct, threads it through New(), and has Run() use h.refresh instead of the hardcoded delay. Parses the refresh directive in setup() mirroring route53's exact validation (accepts a plain number as seconds or a duration string, must be greater than 0). Extends TestSetupCloudDNS with refresh coverage (valid duration, valid plain number, missing arg, non-numeric, zero, negative). Verified it fails without the setup.go change (unknown property error) and passes with it. Signed-off-by: stackedbyaradhya <aradhyaj736@gmail.com>
6.2 KiB
6.2 KiB