gocryptotrader
gocryptotrader copied to clipboard
stream/match: allow a single connection to maintain its own match lookup for multi-connection
PR Description
-
Attempts to decouple a connection from a global lookup table for outbound request to response matching. This allows for generic startup messages to be used across future multiple connections of the same type. This also minimises the chance of a signature conflict on outbound requests. Potentially reduces the semacquire slowness when dealing with many concurrently spawned and subscribed return responses.
-
This is backwards compatible.
-
Starts implementation in Gateio due to #1580 base.
Requires #1580 #1581
Type of change
Please delete options that are not relevant and add an x
in []
as item is complete.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How has this been tested
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and also consider improving test coverage whilst working on a certain feature or package.
- [ ] go test ./... -race
- [ ] golangci-lint run
- [ ] Test X
Checklist
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation and regenerated documentation via the documentation tool
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally and on Github Actions with my changes
- [ ] Any dependent changes have been merged and published in downstream modules