ExLoader v0.4.1 ExLoader View Source
Documentation for ExLoader.
Link to this section Summary
Functions
load a list of apps from a release (generated by distillery) to remote node
load a single beam to a remote node
load a release (generated by distillery) to remote node
Check if given file is valid or not
Link to this section Functions
load a list of apps from a release (generated by distillery) to remote node.
Behind the scenes, it copies the tarball to remote node, extracts it, add all beam folders by using :code.add_path
, load the configration from sys.config and then start the given apps.
Examples
iex> ExLoader.load_apps("example_app.tar.gz")
:ok
iex> :rpc.call(node(), ExampleApp.Server, :hello, ["world"])
"hello world"
load a single beam to a remote node
Behind the scenes, it uses :code.load_abs/1
.
Examples
iex> ExLoader.load_module("hello.beam")
{:ok, Hello}
iex> :rpc.call(node(), Hello, :say, ["world"])
"hello world"
load a release (generated by distillery) to remote node.
Behind the scenes, it copies the tarball to remote node, extracts it, add all beam folders by using :code.add_path
, load the configration from sys.config and then start all the apps.
Examples
iex> ExLoader.load_release("example_complex_app.tar.gz")
:ok
iex> # assume example_complex_app.tar.gz contains a http server. Now http://hostname:8888/hello is available.
nil
iex> HttpPoison.get("http://hostname:8888/hello/?msg=world")
{:ok, %HTTPoison.Response{body: "hello world", ...}}
Check if given file is valid or not