標籤:val unset ror integer ensure erlang mis move clu
ensure_all_started(Application) -> {ok, Started} | {error, Reason}ensure_all_started(Application, Type) -> {ok, Started} | {error, Reason}Types Application = atom() Type = restart_type() Started = [atom()] Reason = term() ensure_started(Application) -> ok | {error, Reason}ensure_started(Application, Type) -. ok | {error, Reason}Types Application = atom() Type = restart_type() Reason = term() get_all_env() -> Envget_all_env(Application) -> EnvTypes
Application = atom()
Env = [{Par :: atom(), Val :: term()}]
get_all_key() -> [] | {ok, Keys}get_all_key(Application) -> undefined | KeysTypes Application = atom() Keys = {ok, [{Key :: atom(), Val :: term()}, ...]} get_application() -> undefined | {ok, Application}get_application(PidOrModule) -> undefined | {ok, Application}Types PidOrModule = (Pid :: pid()) | (Module :: module()) Application = atom() get_env(Par) -> undefined | {ok, Val}get_env(Application, Par) -> undefined | {ok, Val}Types Application = Par = atom() Val = term()get_env(Application, Par, Def) -> ValTypesApplication = Par = atom()
Def = Val = term()get_key(Key) -> undefined | {ok, Val}
get_key(Application, Key) -> undefined | {ok, Val}TypesApplication = Key = atom()Val = term() load(AppDescr) -> ok | {error, Reason}load(AppDescr, Distributed) -> ok | {error, Reason}TypesAppDescr = Application | (AppSpec :: application_spec())Application = atom()Distributed =
{Application, Nodes} | {Application, Time, Nodes} | defaultNodes = [node() | tuple_of(node())]Time = integer() >= 1Reason = term()application_spec() =
{application,
Application :: atom(),
AppSpecKeys :: [application_opt()]}
application_opt() =
{description, Description :: string()} |
{vsn, Vsn :: string()} |
{id, Id :: string()} |
{modules, [Module :: module()]} |
{registered, Names :: [Name :: atom()]} |
{applications, [Application :: atom()]} |
{included_applications, [Application :: atom()]} |
{env, [{Par :: atom(), Val :: term()}]} |
{start_phases,
[{Phase :: atom(), PhaseArgs :: term()}] | undefined} |
{maxT, MaxT :: timeout()} |
{maxP, MaxP :: integer() >= 1 | infinity} |
{mod, Start :: {Module :: module(), StartArgs :: term()}}
loaded_applications() -> [{Application, Description, Vsn}]TypesApplication = atom()Description = Vsn = string() permit(Application, Permission) -> ok | {error, Reason}TypesApplication = atom()Permission = boolean()Reason = term() set_env(Application, Par, Val) -> okset_env(Application, Par, Val, Opts) -> okTypesApplication = Par = atom() Val = term()Opts = [{timeout, timeout()} | {persistent, boolean()}] start(Application) -> ok | {error, Reason}start(Application, Type) -> ok | {error, Reason}TypesApplication = atom()Type = restart_type()Reason = term() start_type() -> StartType | undefined | localTypesStartType = start_type() stop(Application) -> ok | {error, Reason}TypesApplication = atom()Reason = term() takeover(Application, Type) -> ok | {error, Reason}TypesApplication = atom()Type = restart_type()Reason = term() unload(Application) -> ok | {error, Reason}TypesApplication = atom()Reason = term() unset_env(Application, Par) -> okunset_env(Application, Par, Opts) -> okTypesApplication = Par = atom() Opts = [{timeout, timeout()} | {persistent, boolean()}] which_applications() -> [{Application, Description, Vsn}]which_applications(Timeout) -> [{Application, Description, Vsn}]TypesTimeout = timeout()Application = atom()Description = Vsn = string()
Module:start(StartType, StartArgs) -> {ok, Pid} | {ok, Pid, State} | {error, Reason}
Module:start_phase(Phase, StartType, PhaseArgs) -> ok | {error, Reason}
Module:prep_stop(State) -> NewState
Module:stop(State)
Module:config_change(Changed, New, Removed) -> ok
Erlang 中application 匯出介面