package redis

import (
	

	
)

// DialRetryBackoffConstant returns a dial retry backoff function that always returns d.
// attempt is 0-based: attempt=0 is the delay after the 1st failed dial.
func ( time.Duration) func( int) time.Duration {
	if  < 0 {
		 = 0
	}
	return func(int) time.Duration { return  }
}

// DialRetryBackoffExponential returns a dial retry backoff function that uses exponential
// backoff with jitter and a cap, using internal.RetryBackoff.
//
// attempt is 0-based: attempt=0 is the delay after the 1st failed dial.
func (,  time.Duration) func( int) time.Duration {
	if  < 0 {
		 = 0
	}
	if  < 0 {
		 = 0
	}
	if  >  {
		 = 
	}
	return func( int) time.Duration {
		// internal.RetryBackoff expects retry >= 0.
		if  < 0 {
			 = 0
		}
		return internal.RetryBackoff(, , )
	}
}