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
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, writing the output of
command to device.
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.
Types
@type conn() :: identifier() | struct()
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, writing the output of
command to device.
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
Executes the given command on the connection in state.
Examples
state = Dicon.Executor.connect("meg:secret@example.com")
Dicon.Executor.exec(state, "ls -la")
#=> :ok