Created public api, cleaned up internals.

This commit is contained in:
Jay
2026-04-19 14:23:10 -04:00
parent d2528d3ac7
commit dfd28d65bc
7 changed files with 158 additions and 126 deletions
+2 -8
View File
@@ -147,15 +147,9 @@ func WithWriteTimeout(value time.Duration) ConnectionOption {
}
}
// WithRetry enables retry with default parameters (infinite retries,
// 1s initial delay, 5s max delay, 0.5 jitter factor).
//
// If passed after granular retry options (WithRetryMaxRetries, etc.),
// it will overwrite them. Use either WithRetry alone or the granular
// options; not both.
func WithRetry() ConnectionOption {
func WithoutRetry() ConnectionOption {
return func(c *ConnectionConfig) error {
c.Retry = GetDefaultRetryConfig()
c.Retry = nil
return nil
}
}