proxy.golang.org : github.com/reiver/go-slackchannelrouter
Package slackchannelrouter provides a router to be used with the flog package ( https://github.com/reiver/go-flog ). The Slack channel router is blocking. And since it is making an API request to Slack's API servers (across the Internet) it can block for some time. To deal with this, it is recommended you wrap the Slack channel router in a flog.NonBlockingRouter. For example: Putting this altogether, basic usage look something like this: (Although likely you would be using other routers too, besides just the Slack channel router.) You may want to modify the log before sending it to Slack. For example, if you logged the following message: And again for example, let's say that message gets rendered as: Then we might want to change this message before posting it to Slack, as follows: To do that we would use the flog.MappingRouter. So for example using that, plus also the flog.NonBlockingRouter mentioned already: For more information on the flogger, see the flog package: https://github.com/reiver/go-flog
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/reiver/go-slackchannelrouter
License: MIT
Latest release: over 9 years ago
First release: over 9 years ago
Namespace: github.com/reiver
Last synced: about 1 month ago