cgroschupp / go-client-confluent-cloud

MIT License
13 stars 19 forks source link

Allow a pre-configured resty client instance to be injected #25

Open benweint opened 2 years ago

benweint commented 2 years ago

This change makes it possible for consumers of this module to take advantage of features of go-resty/resty that are currently inaccessible due to the fact that the resty.Client instance is inaccessible.

The specifi feature that I'm hoping to use is retry support, which requires clients wishing to opt-in to call the SetRetry* family of methods on the resty.Client instance. I'm also interested in using resty's middleware functionality.

benweint commented 2 years ago

FWIW, I believe this would also provide a workable solution to the issue described in https://github.com/cgroschupp/go-client-confluent-cloud/pull/22 - clients wishing to skip debug logging would just need to use the newly-introduced function allowing them to inject their own Client instance, and pass one without debug logging enabled.