1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-04-04 20:44:27 +02:00

14 lines
371 B
Go
Raw Normal View History

2016-11-07 09:40:11 +01:00
package client
2018-03-03 11:53:52 +00:00
import (
"context"
)
2016-11-07 16:51:28 +00:00
// note that returning either false or a non-nil error will result in the call not being retried
type RetryFunc func(ctx context.Context, req Request, retryCount int, err error) (bool, error)
2016-11-07 09:40:11 +01:00
// always retry on error
func alwaysRetry(ctx context.Context, req Request, retryCount int, err error) (bool, error) {
return true, nil
2016-11-07 09:40:11 +01:00
}