Application callbacks.
Copyright (c) 2015, 2016 Silent Circle
Behaviours: application
.
Authors: Edwin Fine (efine@silentcircle.com
).
start/2 | This function is called whenever an application is started using application:start/[1,2], and should start the processes of the application. |
stop/1 | This function is called whenever an application has stopped. |
start(StartType, StartArgs) -> Result
StartType = normal | {takeover, Node} | {failover, Node}
StartArgs = term()
Result = {ok, Pid} | {ok, Pid, State} | {error, Reason}
Node = node()
Pid = pid()
State = term()
Reason = term()
This function is called whenever an application is started using application:start/[1,2], and should start the processes of the application. If the application is structured according to the OTP design principles as a supervision tree, this means starting the top supervisor of the tree.
stop(State) -> ok
State = term()
This function is called whenever an application has stopped. It is intended to be the opposite of Module:start/2 and should do any necessary cleaning up. The return value is ignored.