kurin / blazer

A Go library for Backblaze's B2.
Other
126 stars 34 forks source link

Expose debug info #42

Open kurin opened 6 years ago

kurin commented 6 years ago

In #41 a user noticed that there was no data going, but didn't have good visibility into what was happening.

Should b2 expose debug info? If so, how?

kurin commented 6 years ago

We already have Client.Status(), but getting information out of this requires application authors to take advantage of it. It might be nice to provide either a debug page listening (off the default mux) on a local socket or at least a library that makes it easy to do so.

kurin commented 6 years ago

This needs to find a balance between "once you need it, you'll wish you had enabled it" and "don't do weird, unexpected nonsense like put http servers on random sockets."

kurin commented 6 years ago

Maybe for now just add ServeHTTP to b2.Client and let app authors call http.Handle("/b2what", client) if they like.