github.com/blend/go-sdk@v1.20220411.3/retry/should_retry_provider.go (about)

     1  /*
     2  
     3  Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file.
     5  
     6  */
     7  
     8  package retry
     9  
    10  // ShouldRetryProvider is a function that returns if we should retry
    11  // on an error or abort retries.
    12  // Return `true` to continue to retry, and `false` otherwise to abort retries.
    13  // If you do not specify a provider, all errors will be retried (`true` by default)
    14  type ShouldRetryProvider func(error) bool