dicon v0.2.0 Dicon.Executor behaviour
Behaviour for executors.
This behaviour specifies the callbacks that executors must implement. Look at
the documentation for the Dicon
module for more information about executors.
Summary
Functions
Connects to authority
Copies the source
file on the local machine to the target
on the remote
machine on the connection in state
Executes the given command
on the connection in state
Callbacks
Connects to the given authority, returning a term that identifies the connection
Copies the local file source
over to the destination target
on the given
connection
Executes the given command
on the given connection
Functions
Connects to authority.
The connection happens through the executor configured in the configuration
for the :dicon
application; see the documentation for the Dicon
module for
more information.
Examples
%Dicon.Executor{} = Dicon.Executor.connect("meg:secret@example.com")
Copies the source
file on the local machine to the target
on the remote
machine on the connection in state
.
Examples
state = Dicon.Executor.connect("meg:secret@example.com")
Dicon.Executor.copy(state, "hello.txt", "uploaded-hello.txt")
#=> :ok
Callbacks
Specs
connect(authority :: binary) ::
{:ok, identifier} |
{:error, term}
Connects to the given authority, returning a term that identifies the connection.
Specs
copy(identifier, source :: char_list, target :: char_list) :: :ok
Copies the local file source
over to the destination target
on the given
connection.