humbug icon indicating copy to clipboard operation
humbug copied to clipboard

Create library method that wraps `HumbugReporter.Publish` in a goroutine

Open zomglings opened this issue 3 years ago • 0 comments

The function should have a signature like this:

func (reporter *HumbugReporter) PublishAsync(report Report) (func, <-bool) {
    ...
}

The return values should be:

  1. A function with no arguments and no return which can be run as a goroutine. when run, this routine will publish the given report.
  2. 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) {
    ...
}

zomglings avatar May 06 '21 02:05 zomglings