Skip to content

Latest commit

 

History

History
61 lines (37 loc) · 1.91 KB

sc_push_lib_app.md

File metadata and controls

61 lines (37 loc) · 1.91 KB

Module sc_push_lib_app

Application callbacks.

Copyright (c) 2015, 2016 Silent Circle

Behaviours: application.

Authors: Edwin Fine (efine@silentcircle.com).

Function Index

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.

Function Details

start/2


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/1


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.