blackducksoftware / hub-client-go

Hub Client for Go (golang)
Apache License 2.0
9 stars 19 forks source link

make http client public so that users can change config settings #13

Closed mattfenwick closed 6 years ago

mattfenwick commented 6 years ago

For example, so that the timeout can be changed.

robpacheco commented 6 years ago

What sort of config changes are you thinking about?

jayunit100 commented 6 years ago

https://blog.cloudflare.com/the-complete-guide-to-golang-net-http-timeouts/ Stuff like that , yeah default client needs a lot of tuning

robpacheco commented 6 years ago

My concern with expose the client publicly is that its actual methods are not intended to be used directly, but through the methods that exist in the client wrapper. The client wrapper knows how to handle all of the auth and header and tokens and stuff. Is there a way to specify these to the wrapper without having to expose the client directly?

jayunit100 commented 6 years ago

Fair enough - @mattfennwick can we just add

setTimeout(...) setTransport(...)

Plumbing so that we don’t expose any other generic functionality of the client ?

mattfenwick commented 6 years ago

Okay @jayunit100 @robpacheco updated, can you guys take another look?