知识养成了思想,思想同时又在融化知识。这篇文章主要讲述Erlang 中application 导出接口相关的知识,希望能为你提供帮助。
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() ->
Env
get_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) ->
ValTypes
Application = Par = atom()
Def = Val = term()get_key(Key) ->
undefined | {ok, Val}
get_key(Application, Key) ->
undefined | {ok, Val}Types
Application = Key = atom()
Val = term()
load(AppDescr) ->
ok | {error, Reason}load(AppDescr, Distributed) ->
ok | {error, Reason}Types
AppDescr = Application | (AppSpec :: application_spec())
Application = atom()
Distributed =
{Application, Nodes} | {Application, Time, Nodes} | default
Nodes = [node() | tuple_of(node())]
Time = integer() >
=
1
Reason =
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}]Types
Application = atom()
Description = Vsn = string()
permit(Application, Permission) ->
ok | {error, Reason}Types
Application = atom()
Permission = boolean()
Reason = term()
set_env(Application, Par, Val) ->
okset_env(Application, Par, Val, Opts) ->
okTypes
Application = Par = atom()
Val = term()
Opts = [{timeout, timeout()} | {persistent, boolean()}]
start(Application) ->
ok | {error, Reason}start(Application, Type) ->
ok | {error, Reason}Types
Application = atom()
Type = restart_type()
Reason = term()
start_type() ->
StartType | undefined | localTypes
StartType = start_type()
stop(Application) ->
ok | {error, Reason}Types
Application = atom()
Reason = term()
takeover(Application, Type) ->
ok | {error, Reason}Types
Application = atom()
Type = restart_type()
Reason = term()
unload(Application) ->
ok | {error, Reason}Types
Application = atom()
Reason = term()
unset_env(Application, Par) ->
okunset_env(Application, Par, Opts) ->
okTypes
Application = Par = atom()
Opts = [{timeout, timeout()} | {persistent, boolean()}]
which_applications() ->
[{Application, Description, Vsn}]which_applications(Timeout) ->
[{Application, Description, Vsn}]Types
Timeout = 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)
【Erlang 中application 导出接口】Module:config_change(Changed, New, Removed) ->
ok
推荐阅读
- 前端转安卓后的经历
- @RequestMapping
- Oracle Apps DBA R12.2 Syllabus
- Lync 项目经验-20-Skype for Business for Android-下载到电脑
- application programCan'tStart
- 38.mapping小例子
- 芝麻HTTP(Appium的安装)
- server下修改项目发布位置,存放到tomcatwebapps下(项目发布之前)
- The Tangled Web: A Guide to Securing Modern Web Applications 原版pdf