concrete type makes wrapping anything other than the http.RoundTripper a
> practical impossibility.
>
> Personally, I've been using http.RoundTripper middleware for several years
> without issue. It's a solid pattern that can provide an enormous amount of
> value by allowi
I am trying to understand in what cases would it make sense to
implement my own RoundTripper.
If I search about it, I come across examples of RoundTripper that try
to do things like caching, retries, authentication, etc. I also read
somewhere that there are many RoundTripper implementations that j
Hi,
I have a situation where I have a chain of middlewares with a logger
middleware that comes before an authentication middleware. Logger
middleware logs about the incoming request, calls the next middleware
in the chain and then logs about the response. Authentication
middleware authenticates th
ber of goroutines trying
> to concurrently write to the log file. This remove the need for the
> buffering scheme.
>
>
> On Sunday, August 5, 2018 at 9:32:06 AM UTC-7, Anuj Agrawal wrote:
>>
>> I have an application with more than 50k goroutines. I pass a context to
tips and tricks.
>
> To remove the final parameter from a function, temporarily change the
> function signature so that the final parameter is variadic, as this
> allows legal calls both with and without the argument. Then use eg to
> remove the final argument from all callers, and r
I have an application with more than 50k goroutines. I pass a context to
each of these goroutines which contains a logger and that logger writes to
a file. At some point, the number of goroutines trying to write a log
peaked and my application crashed with - runtime: program exceeds
1-thread li
code. That leaves
me with only one choice - that I copy the code and then write the
plugin on top of it. That does not sound like a very great idea as
compared to being able to import the package itself.
Is there any particular reason for not exporting any symbols in the gofix code?
Thanks,
Anuj
I am seeing similar logs even after I add db.SetConnMaxLifetime(10 *
time.Second).
Test code here: https://play.golang.org/p/itTUXDYv4Ge
Any suggestions on how to debug further?
On Monday, December 25, 2017 at 12:10:02 PM UTC+5:30, Naoki INADA wrote:
>
>
>>
>> To prevent further errors set con