github.com/aavshr/aws-sdk-go@v1.41.3/aws/client/no_op_retryer.go (about) 1 package client 2 3 import ( 4 "time" 5 6 "github.com/aavshr/aws-sdk-go/aws/request" 7 ) 8 9 // NoOpRetryer provides a retryer that performs no retries. 10 // It should be used when we do not want retries to be performed. 11 type NoOpRetryer struct{} 12 13 // MaxRetries returns the number of maximum returns the service will use to make 14 // an individual API; For NoOpRetryer the MaxRetries will always be zero. 15 func (d NoOpRetryer) MaxRetries() int { 16 return 0 17 } 18 19 // ShouldRetry will always return false for NoOpRetryer, as it should never retry. 20 func (d NoOpRetryer) ShouldRetry(_ *request.Request) bool { 21 return false 22 } 23 24 // RetryRules returns the delay duration before retrying this request again; 25 // since NoOpRetryer does not retry, RetryRules always returns 0. 26 func (d NoOpRetryer) RetryRules(_ *request.Request) time.Duration { 27 return 0 28 }