Skip to main content
Version: v1.40.0

Slack

Overview​

Send notifications to a Slack channel.

About Slack Notifier​

The Slack notifier allows you to get notification on your favorite slack channel when an instance of go-feature-flag is detecting changes in the configuration file.

Configure Slack Notification​

  1. First, you need to create an incoming webhook on your slack instance. You can follow this documentation to see how to do it
  2. Copy your webhook URL. It should look like: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX.
  3. Now you can configure your notifier

Configure the relay proxy​

To configure your relay proxy to use the Slack notifier, you need to add the following configuration to your relay proxy configuration file:

goff-proxy.yaml
# ...
notifier:
- kind: slack
webhookUrl: "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
# ...
Field nameMandatoryTypeDefaultDescription
kindstringnoneValue should be slack.
This field is mandatory and describe which retriever you are using.
webhookUrlstringnoneThe complete URL of your incoming webhook configured in Slack.

Configure the GO Module​

To configure your GO module to use the Slack notifier, you need to add the following configuration to your ffclient.Config{} object:

example.go
err := ffclient.Init(ffclient.Config{
// ...
Notifiers: []notifier.Notifier{
&slacknotifier.Notifier{
SlackWebhookURL: "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
},
// ...
},
})
defer ffclient.Close()
FieldMandatoryDescription
SlackWebhookURLThe complete URL of your slack webhook.