diff options
Diffstat (limited to 'lib/exping')
-rw-r--r-- | lib/exping/application.ex | 14 | ||||
-rw-r--r-- | lib/exping/supervisor.ex | 20 |
2 files changed, 34 insertions, 0 deletions
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 |