Create library method that wraps `HumbugReporter.Publish` in a goroutine
zomglings opened this issue · comments
Neeraj Kashyap commented
The function should have a signature like this:
func (reporter *HumbugReporter) PublishAsync(report Report) (func, <-bool) {
...
}
The return values should be:
- A function with no arguments and no return which can be run as a goroutine. when run, this routine will publish the given report.
- A channel to which the go routine will write
true
when publication is complete.
Instead of making this a method on HumbugReporter
, we could also implement it with signature:
func PublishAsync(reporter *HumbugReporter, report Report) (func, <-bool) {
...
}