Discord
Overviewβ
Send notifications to a Discord channel.About Discord Notifierβ
The discord notifier allows to get notified on your favorite discord channel when an instance of go-feature-flag
is
detecting changes in the configuration of your flags.
Configure Discord Notificationsβ
- Connect to your discord account and go on the channel where you want to send the notifications.
- Go on the settings menu of your channel.
- Under your channelβs settings, go to the "Integrations" section and create a new webhook. To create it, please follow the official documentation.
- Copy the webhook URL
- Now you can configure your notifier
Configure the relay proxyβ
To configure your relay proxy to use the Discord notifier, you need to add the following configuration to your relay proxy configuration file:
goff-proxy.yaml
# ...
notifier:
- kind: discord
webhookUrl: "https://discord.com/api/webhooks/yyyy/xxxxxxx"
# ...
Field name | Mandatory | Type | Default | Description |
---|---|---|---|---|
kind | string | none | Value should be discord .This field is mandatory and describe which retriever you are using. | |
webhookUrl | string | none | The complete URL of your incoming webhook configured in Discord. |
Configure the GO Moduleβ
To configure your GO module to use the Discord notifier, you need to add the following
configuration to your ffclient.Config{}
object:
example.go
err := ffclient.Init(ffclient.Config
{
// ...
Notifiers: []notifier.Notifier{
&discordnotifier.Notifier{
DiscordWebhookURL: "https://discord.com/api/webhooks/yyyy/xxxxxxx",
},
},
})
defer ffclient.Close()
Field | Mandatory | Description |
---|---|---|
DiscordWebhookURL | The complete URL of your discord webhook. |