From 2175a2f4d9a416f4a443166a2487c8c12a3df9e2 Mon Sep 17 00:00:00 2001 From: kballou Date: Tue, 26 Jul 2016 12:39:08 -0600 Subject: ExPing: Initial Commit --- lib/exping/application.ex | 14 ++++++++++++++ lib/exping/supervisor.ex | 20 ++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 lib/exping/application.ex create mode 100644 lib/exping/supervisor.ex (limited to 'lib/exping') diff --git a/lib/exping/application.ex b/lib/exping/application.ex new file mode 100644 index 0000000..33fce39 --- /dev/null +++ b/lib/exping/application.ex @@ -0,0 +1,14 @@ +defmodule ExPing.Application do + use Application + @moduledoc """ + Application definition for ExPing + """ + + @doc """ + Start ExPing OTP Application + """ + @spec start(any, any) :: {:ok, pid} | {:error, any} + def start(_, _) do + ExPing.Supervisor.start_link() + end +end diff --git a/lib/exping/supervisor.ex b/lib/exping/supervisor.ex new file mode 100644 index 0000000..403f35c --- /dev/null +++ b/lib/exping/supervisor.ex @@ -0,0 +1,20 @@ +defmodule ExPing.Supervisor do + use Supervisor + + @moduledoc """ + ExPing Supervision Tree + """ + + @spec start_link :: {:ok, pid} | {:error, any} + def start_link do + Supervisor.start_link(__MODULE__, []) + end + + @spec init(any) :: no_return + def init(_) do + children = [ + ] + + supervise(children, strategy: :one_for_one, name: __MODULE__) + end +end -- cgit v1.2.1