trickster icon indicating copy to clipboard operation
trickster copied to clipboard

pkg/proxy/engines.proxyRequest: review struct data model / field layout

Open crandles opened this issue 7 months ago • 2 comments

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

crandles avatar May 01 '25 20:05 crandles

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

Elia-Renzoni avatar Jul 25 '25 14:07 Elia-Renzoni

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.

crandles avatar Jul 26 '25 17:07 crandles