Adding the ability to specify a function to check if micro should retry a failed rpc call

This commit is contained in:
Scott Finlay
2016-11-03 10:45:31 +01:00
parent 2c65a38ba9
commit d7e4062a0e
4 changed files with 44 additions and 4 deletions

View File

@@ -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
}
}