Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
Add marathon health check for /heimdall-health-check
Browse files Browse the repository at this point in the history
  • Loading branch information
emptyflash committed Nov 14, 2016
1 parent 12affa1 commit d69e813
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/router.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Heimdall.Router do
@moduledoc """
The applications router plug.
The applications router plug.
Forwards Marathon callback events coming in from /marathon-callback
to `Heimdall.Marathon.BingeWatch` which will update the dynamic routes.
Expand All @@ -11,13 +11,20 @@ defmodule Heimdall.Router do
use Plug.Router
alias Heimdall.Marathon.BingeWatch
alias Heimdall.DynamicRoutes
import Rackla

plug :match
plug :dispatch


forward "/marathon-callback", to: BingeWatch

get "/heimdall-health-check" do
Application.fetch_env!(:heimdall, :marathon_url) <> "/ping"
|> request
|> response
end

forward "/", to: DynamicRoutes, tab: :heimdall_routes

end

0 comments on commit d69e813

Please sign in to comment.