Slack
Gives you ability to send Slack messages using slack bot. You can define multiple Slack bots. Also, it's used to send messages if you use our ErrorLogger service using errors bot. The config that needs to be set in hitrix.yaml is:
slack:
error_channel: "test" #optional, used by ErrorLogger
dev_panel_url: "test" #optional, used by ErrorLogger
bot_tokens:
errors: "your token"
another_bot: "second token"
1
2
3
4
5
6
2
3
4
5
6
NOTE:
bot_tokens.errorsis a must-have when usingErrorLoggerservice.
Register the service into your main.go file:
registry.ServiceProviderSlack()
1
Access the service:
service.DI().Slack()
1