Polykey
Polykey copied to clipboard
Add lazy WebSocketConnection creation to PolykeyClient
Description
Adds lazy WebSocketConnection creation to PolykeyClient
Issues Fixed
- Fixes #771
Tasks
- [x] 1. Add lazy parameter to PolykeyClient
Final checklist
- [ ] Domain specific tests
- [ ] Full tests
- [ ] Updated inline-comment documentation
- [ ] Lint fixed
- [ ] Squash and rebased
- [ ] Sanity check the final build
Looks fine, two things stand out though.
- Before it was expected that parameters like ports and addresses would be define while the client is running. This isn't true anymore so it may brake some things making that assumptions. Usually testing if that?
- You don't have any tests for the new behaviour. You'll need a few to demostrate the lazy feature along with making sure it works as expected and for catching future regressions.
Need to be redone in the future, more considerations must be made as the API will actually change if the PolykeyClient is lazy. We should probably just make 2 separate classes instead for lazy + non-lazy respectively.