blob: d83db7d22b58cdc22007cd88ff4ee483641f69b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
%% @copyright 2011 Hunter Morris
%% @doc Implementation of `application' behaviour.
%% @private
%% @end
%% Distributed under the MIT license; see LICENSE for details.
-module(bcrypt_app).
-author('Hunter Morris <hunter.morris@smarkets.com>').
-behaviour(application).
-export([start/2, stop/1]).
-spec start(StartType, StartArgs) -> Result when
StartType :: normal,
StartArgs :: term(),
Result :: {ok, pid()} | {error, Reason},
Reason :: term().
start(normal, _Args) ->
case bcrypt_sup:start_link() of
{ok, Pid} -> {ok, Pid};
{error, _} = Error -> Error
end.
-spec stop(State) -> Result when
State :: term(),
Result :: ok.
stop(_State) -> ok.
|