More versatile HQ client init#442
Conversation
Pass `HQKey, HQSecret, HQProject, HQAddress` as params on `HQ.New` instead of loading them via `config.Get()` inside `HQ.Start`. This way, we can have multiple HQ client instances with different parameters. This is necessary to be able to create a 2nd HQ client instance which connects an "outlinks" HQ project to send outlinks there.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #442 +/- ##
==========================================
- Coverage 54.82% 54.68% -0.14%
==========================================
Files 120 120
Lines 7333 7351 +18
==========================================
Hits 4020 4020
- Misses 2987 3005 +18
Partials 326 326
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi! How is that necessary compared to modifying HQ client to accept a new (optional) parameter (like HQOutlinksProject) that would be used instead of HQProject if specified? |
|
I can explain my plan: In Also, the post processor will change from Then, in And finally, in postprocessor And we are done. The required changes are minimal. IMHO the current hq pkg is very nice and well tested, we shouldn't touch it. We may introduce bugs. If we tried adding |
|
@yzqzss there is an extra parameter that isn't covered by your suggested solution. IMHO my solution is not complicated and requires few changes. Anyway, its not my place to decide Zeno architecture. |
It totally is! :) Although, it's clearly not mine when it comes to HQ, because I don't work at the Internet Archive anymore. More @NGTmeaty ! |
|
@vbanos For the time being, let's proceed with your proposal that keeps the logic in Zeno. Given that HQ isn't open source at this time, I'd rather the functionality be in Zeno where all users can take advantage of it |
Pass `HQKey, HQSecret, HQProject, HQAddress` as params on `HQ.New` instead of loading them via `config.Get()` inside `HQ.Start`. This way, we can have multiple HQ client instances with different parameters. This is necessary to be able to create a 2nd HQ client instance which connects an "outlinks" HQ project to send outlinks there.

Pass
HQKey, HQSecret, HQProject, HQAddressas params onHQ.Newinstead of loading them viaconfig.Get()insideHQ.Start.This way, we can have multiple HQ client instances with different parameters.
This is necessary to be able to create a 2nd HQ client instance which connects an "outlinks" HQ project to send outlinks there.