add webhook service

This commit is contained in:
kiwiidb
2022-04-27 13:54:15 +02:00
parent 017bf282fd
commit 03baba8c37
2 changed files with 8 additions and 0 deletions

View File

@@ -168,6 +168,13 @@ func main() {
// Subscribe to LND invoice updates in the background
go svc.InvoiceUpdateSubscription(context.Background())
//Start webhook subscription
if svc.Config.WebhookUrl != "" {
webhookCtx, cancelWebhook := context.WithCancel(context.Background())
go svc.StartWebhookSubscribtion(webhookCtx)
defer cancelWebhook()
}
//Start Prometheus server if necessary
var echoPrometheus *echo.Echo
if svc.Config.EnablePrometheus {