From 2dbbcefef2db79dcbe0ee25c1bdf040c4613ae9a Mon Sep 17 00:00:00 2001 From: Arvind Bright Date: Thu, 9 May 2024 11:48:43 -0700 Subject: [PATCH] resolver/dns: Add docstring to SetMinResolutionInterval (#7217) --- resolver/dns/dns_resolver.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resolver/dns/dns_resolver.go b/resolver/dns/dns_resolver.go index f1320b9f44c1..ef3d6ed6c439 100644 --- a/resolver/dns/dns_resolver.go +++ b/resolver/dns/dns_resolver.go @@ -18,9 +18,6 @@ // Package dns implements a dns resolver to be installed as the default resolver // in grpc. -// -// Deprecated: this package is imported by grpc and should not need to be -// imported directly by users. package dns import ( @@ -53,8 +50,11 @@ func NewBuilder() resolver.Builder { return dns.NewBuilder() } -// SetMinResolutionInterval sets the default minimum interval at which DNS re-resolutions are -// allowed. This helps to prevent excessive re-resolution. +// SetMinResolutionInterval sets the default minimum interval at which DNS +// re-resolutions are allowed. This helps to prevent excessive re-resolution. +// +// It must be called only at application startup, before any gRPC calls are +// made. Modifying this value after initialization is not thread-safe. func SetMinResolutionInterval(d time.Duration) { dns.MinResolutionInterval = d }