Handle multiple network endpoints and choose a healthy one with offchain indexing enabled #1693
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As opposed to #1603, I did not introduce a connectivity store here. The current approach is quite simple in handling multiple endpoints and could easily be integrated in the current state of the app, otherwise we need more refactoring. Hence, I think that #1603 can still be closed until we realize that we need a more sophisticated solution. Closes #1603.
Changes:
EndpointManager
that has a list of endpoints and is generic over a mixin that checks the healthiness of the endpoints. With this, we can easily re-use theEndpointManager
to handle multiple endpoints for ipfs and feed too.Future work:
Tests