Module reltool_util
All the functions here are probably considered unorthodox, but
are useful for runtime usage of applications and releases.
Copyright © 2013-2016 Michael Truog
Version: 1.5.2 Sep 9 2016 14:47:25
------------------------------------------------------------------------
Authors: Michael Truog (mjtruog [at] gmail (dot) com).
All the functions here are probably considered unorthodox, but
are useful for runtime usage of applications and releases.
application_env/1 |
Only get the env settings from the application's .app file. |
application_loaded/1 |
. |
application_modules/1 |
. |
application_modules/2 |
Options can contain {behavior, ModuleName} to list all the modules
that use a specific behaviour (the information will not be present if
the beam file was stripped). |
application_purged/1 |
The application is stopped if it is running, but its dependencies are
ignored. |
application_purged/2 |
The application is stopped if it is running, but its dependencies are
ignored. |
application_remove/1 |
Only application dependencies that are not required for other
applications are removed. |
application_remove/2 |
Only application dependencies that are not required for other
applications are removed. |
application_remove/3 |
Only application dependencies that are not required for other
applications are removed. |
application_running/1 |
. |
application_running/2 |
. |
application_start/1 |
. |
application_start/2 |
. |
application_start/3 |
. |
application_stop/1 |
Only stop dependencies that are not required for other applications. |
application_stop/2 |
Only stop dependencies that are not required for other applications. |
applications_start/1 |
. |
applications_start/2 |
. |
boot_remove/1 |
A boot file is used when first starting the Erlang VM. |
boot_remove/2 |
A boot file is used when first starting the Erlang VM. |
boot_remove/3 |
A boot file is used when first starting the Erlang VM. |
boot_start/1 |
A boot file is used when first starting the Erlang VM. |
config_load/1 |
All applications with configuration values are loaded if they are not
already loaded. |
ensure_application_loaded/1 |
. |
ensure_application_started/1 |
. |
ensure_application_stopped/1 |
. |
is_deprecated/3 |
The value false will always be returned if the beam file was stripped. |
is_module_loaded/1 |
. |
is_module_loaded/2 |
Return a new timeout value with the elapsed time subtracted. |
module_behaviours/1 |
The information will not be present if the beam file was stripped. |
module_exports/1 |
. |
module_load/1 |
. |
module_loaded/1 |
If the module is not loaded, attempt to load it. |
module_purged/1 |
If the module is not loaded, ignore it. |
module_purged/2 |
If the module is not loaded, ignore it. |
module_reload/1 |
. |
module_unload/1 |
. |
module_version/1 |
A list is returned with an entry for each use of the -vsn attribute
in the order within the module file for the currently loaded version
(the result is consistent with beam_lib:version/1). |
script_remove/1 |
A script file is the input used when creating a boot file, which is the
file used when first starting the Erlang VM. |
script_remove/2 |
A script file is the input used when creating a boot file, which is the
file used when first starting the Erlang VM. |
script_remove/3 |
A script file is the input used when creating a boot file, which is the
file used when first starting the Erlang VM. |
script_start/1 |
A script file is the input used when creating a boot file, which is the
file used when first starting the Erlang VM. |
application_env(Application::atom()) -> {ok, [{atom(), any()}]} | {error, any()}
Only get the env settings from the application's .app file.
application_loaded(Application::atom()) -> {ok, {atom(), string()}} | {error, any()}
application_modules(Application::atom()) -> {ok, [atom()]} | {error, any()}
application_modules(Application::atom(), Options::[{atom(), any()}]) -> {ok, [atom()]} | {error, any()}
Options can contain {behavior, ModuleName} to list all the modules
that use a specific behaviour (the information will not be present if
the beam file was stripped).
application_purged(Application::atom()) -> ok | {error, any()}
The application is stopped if it is running, but its dependencies are
ignored.
application_purged(Application::atom(), Timeout::pos_integer() | infinity) -> ok | {error, any()}
The application is stopped if it is running, but its dependencies are
ignored.
application_remove(Application::atom()) -> ok | {error, any()}
Only application dependencies that are not required for other
applications are removed.
application_remove(Application::atom(), Timeout::pos_integer() | infinity) -> ok | {error, any()}
Only application dependencies that are not required for other
applications are removed.
application_remove(Application::atom(), Timeout::pos_integer() | infinity, Ignore::[atom()]) -> ok | {error, any()}
Only application dependencies that are not required for other
applications are removed.
application_running(Application::atom()) -> {ok, {atom(), string()}} | {error, any()}
application_running(Application::atom(), Timeout::pos_integer() | infinity) -> {ok, {atom(), string()}} | {error, any()}
application_start(Application::atom()) -> ok | {error, any()}
application_start(Application::atom(), Env::[{atom(), any()}]) -> ok | {error, any()}
application_start(Application::atom(), Env::[{atom(), any()}], Timeout::pos_integer() | infinity) -> ok | {error, any()}
application_stop(Application::atom()) -> ok | {error, any()}
Only stop dependencies that are not required for other applications.
application_stop(Application::atom(), Ignore::[atom()]) -> ok | {error, any()}
Only stop dependencies that are not required for other applications.
applications_start(Applications::[atom() | {atom(), list()}]) -> ok | {error, any()}
applications_start(Applications::[atom() | {atom(), list()}], Timeout::pos_integer() | infinity) -> ok | {error, any()}
boot_remove(FilePath::string()) -> ok | {error, any()}
A boot file is used when first starting the Erlang VM. This function checks
all applications to determine applications which can be safely removed
(assuming the application dependencies are correct). The applications
will then be stopped and their modules will be purged. Normally,
only a single boot file is used during the lifetime of the Erlang VM
(so it is unclear if using this function is bad or just unorthodox).
The boot file is expected to be within a release directory created
by reltool.
boot_remove(FilePath::string(), Timeout::pos_integer() | infinity) -> ok | {error, any()}
A boot file is used when first starting the Erlang VM. This function checks
all applications to determine applications which can be safely removed
(assuming the application dependencies are correct). The applications
will then be stopped and their modules will be purged. Normally,
only a single boot file is used during the lifetime of the Erlang VM
(so it is unclear if using this function is bad or just unorthodox).
The boot file is expected to be within a release directory created
by reltool.
boot_remove(FilePath::string(), Timeout::pos_integer() | infinity, Ignore::[atom()]) -> ok | {error, any()}
A boot file is used when first starting the Erlang VM. This function checks
all applications to determine applications which can be safely removed
(assuming the application dependencies are correct). The applications
will then be stopped and their modules will be purged. Normally,
only a single boot file is used during the lifetime of the Erlang VM
(so it is unclear if using this function is bad or just unorthodox).
The boot file is expected to be within a release directory created
by reltool.
boot_start(FilePath::string()) -> {ok, [atom()]} | {error, any()}
A boot file is used when first starting the Erlang VM. This function checks
all applications to determine if they are already running with the
expected versions. All modules are checked to make sure they have
been loaded, if they are expected to have been loaded. Normally,
only a single boot file is used during the lifetime of the Erlang VM
(so it is unclear if using this function is bad or just unorthodox).
The boot file is expected to be within a release directory created
by reltool.
config_load(FilePath::string()) -> {ok, [atom()]} | {error, any()}
All applications with configuration values are loaded if they are not
already loaded.
ensure_application_loaded(Application::atom()) -> ok | {error, any()}
ensure_application_started(Application::atom()) -> ok | {error, any()}
ensure_application_stopped(Application::atom()) -> ok | {error, any()}
is_deprecated(Module::module(), Function::atom(), Arity::non_neg_integer()) -> boolean()
The value false will always be returned if the beam file was stripped.
is_module_loaded(Module::atom()) -> ok | {error, any()}
is_module_loaded(Module::atom(), Timeout::non_neg_integer()) -> {ok, non_neg_integer()} | {error, any()}
Return a new timeout value with the elapsed time subtracted.
module_behaviours(Module::module()) -> [module()]
The information will not be present if the beam file was stripped.
module_exports(Module::atom()) -> [{atom(), pos_integer()}]
module_load(Module::atom()) -> ok | {error, any()}
module_loaded(Module::atom()) -> ok | {error, any()}
If the module is not loaded, attempt to load it.
module_purged(Module::atom()) -> ok | {error, any()}
If the module is not loaded, ignore it.
module_purged(Module::atom(), Timeout::non_neg_integer() | infinity) -> ok | {error, any()}
If the module is not loaded, ignore it.
module_reload(Module::atom()) -> ok | {error, any()}
module_unload(Module::atom()) -> ok | {error, any()}
module_version(Module::atom()) -> [any()]
A list is returned with an entry for each use of the -vsn attribute
in the order within the module file for the currently loaded version
(the result is consistent with beam_lib:version/1).
The information will not be present if the beam file was stripped.
script_remove(FilePath::string()) -> ok | {error, any()}
A script file is the input used when creating a boot file, which is the
file used when first starting the Erlang VM. This function checks
all applications to determine applications which can be safely removed
(assuming the application dependencies are correct). The applications
will then be stopped and their modules will be purged. Normally,
the script is only used in the binary boot file format and only a single
boot file is used during the lifetime of the Erlang VM
(so it is unclear if using this function is bad or just unorthodox).
The script file is expected to be within a release directory created
by reltool.
script_remove(FilePath::string(), Timeout::pos_integer() | infinity) -> ok | {error, any()}
A script file is the input used when creating a boot file, which is the
file used when first starting the Erlang VM. This function checks
all applications to determine applications which can be safely removed
(assuming the application dependencies are correct). The applications
will then be stopped and their modules will be purged. Normally,
the script is only used in the binary boot file format and only a single
boot file is used during the lifetime of the Erlang VM
(so it is unclear if using this function is bad or just unorthodox).
The script file is expected to be within a release directory created
by reltool.
script_remove(FilePath::string(), Timeout::pos_integer() | infinity, Ignore::[atom()]) -> ok | {error, any()}
A script file is the input used when creating a boot file, which is the
file used when first starting the Erlang VM. This function checks
all applications to determine applications which can be safely removed
(assuming the application dependencies are correct). The applications
will then be stopped and their modules will be purged. Normally,
the script is only used in the binary boot file format and only a single
boot file is used during the lifetime of the Erlang VM
(so it is unclear if using this function is bad or just unorthodox).
The script file is expected to be within a release directory created
by reltool.
script_start(FilePath::string()) -> {ok, [atom()]} | {error, any()}
A script file is the input used when creating a boot file, which is the
file used when first starting the Erlang VM. This function checks
all applications to determine if they are already running with the
expected versions. All modules are checked to make sure they have
been loaded, if they are expected to have been loaded. Normally,
the script is only used in the binary boot file format and only a single
boot file is used during the lifetime of the Erlang VM
(so it is unclear if using this function is bad or just unorthodox).
The script file is expected to be within a release directory created
by reltool.
Generated by EDoc, Sep 9 2016, 14:47:25.