Adding the ability to specify a function to check if micro should retry a failed rpc call
This commit is contained in:
@@ -299,6 +299,11 @@ func (r *rpcClient) Call(ctx context.Context, request Request, response interfac
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if !callOpts.CheckIfRetriable(err) {
|
||||
return err
|
||||
}
|
||||
|
||||
gerr = err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user