Alerting: Support tls config for webhook receiver (#93513)

Adds the ability to configure tls settings on the webhook receiver (e.g. to skip server certificate validation)
This commit is contained in:
Tito Lins
2024-10-22 12:44:32 +02:00
committed by GitHub
parent d722a25084
commit 71d04a326b
19 changed files with 178 additions and 48 deletions
-8
View File
@@ -33,11 +33,3 @@ func NewFakeDisconnectedMailer() *FakeDisconnectedMailer {
func (fdm *FakeDisconnectedMailer) Send(ctx context.Context, messages ...*Message) (int, error) {
return 0, fmt.Errorf("connect: connection refused")
}
// NetClient is used to export original in test.
var NetClient = &netClient
// SetWebhookClient is used to mock in test.
func SetWebhookClient(client WebhookClient) {
netClient = client
}