Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support extensibility of retry condition #686

Closed
tamayika opened this issue Jan 12, 2024 · 0 comments · Fixed by #687
Closed

Support extensibility of retry condition #686

tamayika opened this issue Jan 12, 2024 · 0 comments · Fixed by #687

Comments

@tamayika
Copy link
Contributor

tamayika commented Jan 12, 2024

Currently grpc_retry supports retry condition by setting code.Codes.
But it is good if retry condition is defined by error message, status details, etc...

So I propose below options.

// When returns true, it is retriable.
type RetriableFunc func(err error) bool

// WithRetriable sets which error should be retried.
// When this option is set, WithCodes is ignored.
func WithRetriable(ErrorFunc) CallOption
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant