Documentation ¶
Index ¶
Constants ¶
View Source
const (
// NoRetryLimit specifies that there is no limit to number of srv lookup failures.
NoRetryLimit = -1
)
Variables ¶
View Source
var ( // MinimumRefreshInterval decides the maximum sleep time between SRV Lookups, otherwise controlled by TTL of records. MinimumRefreshInterval = 5 * time.Second )
Functions ¶
Types ¶
type SrvResolverOptions ¶
type SrvResolverOptions func(*resolver)
func WithMaximumConsecutiveErrors ¶
func WithMaximumConsecutiveErrors(maxErr int) SrvResolverOptions
MaximumConsecutiveErrors identifies how many consecutive iterations of bad SRV Lookups to tolerate in a loop. After this limit is reached all the srv resolutions will stop. Default value is -1. -1 means there is no limit.
func WithRetryBackoff ¶
func WithRetryBackoff(retryBackoff *backoff.Backoff) SrvResolverOptions
WithRetryBackoff sets or clears the backoff when retrying after lookup failures. By default, an exponential backoff with a maximum of MinimumRefreshInterval is used. Pass nil to clear backoff, causing instant retries.
Click to show internal directories.
Click to hide internal directories.