External alert-handler support.

This commit is contained in:
Alex Ellis
2017-07-27 12:24:37 +01:00
parent 1e4b5f907a
commit 33381a783a
2 changed files with 35 additions and 1 deletions

View File

@ -14,6 +14,7 @@ import (
"github.com/Sirupsen/logrus"
internalHandlers "github.com/alexellis/faas/gateway/handlers"
"github.com/alexellis/faas/gateway/metrics"
"github.com/alexellis/faas/gateway/plugin"
"github.com/alexellis/faas/gateway/types"
"github.com/docker/docker/client"
"github.com/prometheus/client_golang/prometheus"
@ -69,7 +70,9 @@ func main() {
faasHandlers.Proxy = makeHandler(reverseProxy, &metricsOptions)
faasHandlers.RoutelessProxy = makeHandler(reverseProxy, &metricsOptions)
faasHandlers.Alert = makeHandler(reverseProxy, &metricsOptions)
faasHandlers.Alert = internalHandlers.MakeAlertHandler(plugin.NewExternalServiceQuery(*config.FunctionsProviderURL))
faasHandlers.ListFunctions = makeHandler(reverseProxy, &metricsOptions)
faasHandlers.DeployFunction = makeHandler(reverseProxy, &metricsOptions)
faasHandlers.DeleteFunction = makeHandler(reverseProxy, &metricsOptions)