feat(fcm): add retry config client option support#758
feat(fcm): add retry config client option support#758aminpaydar wants to merge 2 commits intofirebase:masterfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
81bb30e to
9369129
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to configure HTTP retry behavior for Firebase service clients by adding a public WithRetryConfig option and refactoring the internal HTTP client creation logic. The messaging service has been updated to utilize these configurations. Feedback was provided regarding the cloneHTTPClient function, which performs a shallow copy that may be fragile if default options are added to the internal client in the future.
b379e17 to
1f5ad18
Compare
Allow callers to pass retry policy through option.ClientOption so Messaging can honor custom retry behavior from NewApp options. When no retry option is supplied the default retry config is still applied.
1f5ad18 to
256f074
Compare
Clone internal HTTP clients with copied slice/pointer fields and append messaging-specific headers instead of overwriting options. This keeps future defaults from internal.NewHTTPClient intact for both FCM and IID clients.
Allow callers to pass retry policy through option.ClientOption so Messaging can honor custom retry behavior from NewApp options. When no retry option is supplied the default retry config is still applied.
Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:
Discussion
If not, go file an issue about this before creating a pull request to discuss.
Testing
API Changes
us make Firebase APIs better, please propose your change in an issue so that we
can discuss it together.