Skip to content

Latest commit

 

History

History
113 lines (66 loc) · 2.85 KB

sc_push_app.md

File metadata and controls

113 lines (66 loc) · 2.85 KB

Module sc_push_app

Behaviours: application.

Data Types


pv_list() = [pv_tuple()]

pv_tuple() = {term(), term()}

start_type() = normal | {takeover, Node::node()} | {failover, Node::node()}

Function Index

config_change/3 This function is called by an application after a code replacement, if there are any changes to the configuration parameters.
prep_stop/1 This function is called when an application is about to be stopped, before shutting down the processes of the application.
start/2Start the sc_push application.
stop/1Stop the sc_push application.

Function Details

config_change/3


config_change(Changed::pv_list(), New::pv_list(), Removed::list()) -> ok

This function is called by an application after a code replacement, if there are any changes to the configuration parameters. Changed is a list of parameter-value tuples with all configuration parameters with changed values, New is a list of parameter-value tuples with all configuration parameters that have been added, and Removed is a list of all parameters that have been removed.

prep_stop/1


prep_stop(State::term()) -> NewState::term()

This function is called when an application is about to be stopped, before shutting down the processes of the application. State is the state returned from Module:start/2, or [] if no state was returned. NewState is any term and will be passed to Module:stop/1. The function is optional. If it is not defined, the processes will be terminated and then Module:stop(State) is called.

start/2


start(StartType::start_type(), StartArgs::term()) -> {ok, pid(), list()} | {error, term()}

Start the sc_push application.

stop/1


stop(State::term()) -> any()

Stop the sc_push application.