Skip to content

Commit 2dbbcef

Browse files
authored
resolver/dns: Add docstring to SetMinResolutionInterval (#7217)
1 parent 070d9c7 commit 2dbbcef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

resolver/dns/dns_resolver.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818

1919
// Package dns implements a dns resolver to be installed as the default resolver
2020
// in grpc.
21-
//
22-
// Deprecated: this package is imported by grpc and should not need to be
23-
// imported directly by users.
2421
package dns
2522

2623
import (
@@ -53,8 +50,11 @@ func NewBuilder() resolver.Builder {
5350
return dns.NewBuilder()
5451
}
5552

56-
// SetMinResolutionInterval sets the default minimum interval at which DNS re-resolutions are
57-
// allowed. This helps to prevent excessive re-resolution.
53+
// SetMinResolutionInterval sets the default minimum interval at which DNS
54+
// re-resolutions are allowed. This helps to prevent excessive re-resolution.
55+
//
56+
// It must be called only at application startup, before any gRPC calls are
57+
// made. Modifying this value after initialization is not thread-safe.
5858
func SetMinResolutionInterval(d time.Duration) {
5959
dns.MinResolutionInterval = d
6060
}

0 commit comments

Comments
 (0)