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β
- First, you need to create an incoming webhook on your slack instance. You can follow this documentation to see how to do it
- Copy your webhook URL.
It should look like:
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
. - 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 name | Mandatory | Type | Default | Description |
---|---|---|---|---|
kind | string | none | Value should be slack .This field is mandatory and describe which retriever you are using. | |
webhookUrl | string | none | The 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()
Field | Mandatory | Description |
---|---|---|
SlackWebhookURL | The complete URL of your slack webhook. |