pkg/proxy/engines.proxyRequest: review struct data model / field layout
Review the current type proxyRequest struct in pkg/proxy/engines: link.
- Review fields for duplication (e.g. cacheBuffer vs CacheDocument)
- review all status booleans
- improve testability / code readability
- review stdlib offerings
Hi @crandles, I'd like to work on this issue, but I have a quick question before I get started:
Regarding the point "review all status booleans", do you mean reviewing:
the naming of the boolean fields (to make their intent clearer),
or reviewing whether they're necessary / redundant,
or even refactoring them into a more structured state representation?
Just want to make sure I fully understand what you're aiming for here. Thanks
I think those are all great things to consider while reviewing the booleans in the proxyRequest type.
To add one more: i think there's some difference on how the fields get set which might warrant clarifying; some of these fields are "inputs" (e.g. set by a caller outside of proxy_request.go, example) & others seem to be written to directly via the proxyRequest related code (example). I suspect there's a clearer way to structure things that makes it easier to test the proxy request on its own.