Mate.Driver behaviour (Mate v0.1.0) View Source

Link to this section Summary

Callbacks

This one is optional and can be used to close the current connection, cleanup or whatever else might be needed.

Copy a file from remote to local

Copy a file from local to remote

Executes a command using the driver

Starts the driver, for example create an SSH connection, start a docker container, or whatever else might be needed for your new session.

Link to this section Callbacks

Link to this callback

close(session)

View Source (optional)

Specs

close(session :: Mate.Session.t()) :: {:ok, Mate.Session.t()}

This one is optional and can be used to close the current connection, cleanup or whatever else might be needed.

Link to this callback

copy_from(session, src, dest)

View Source

Specs

copy_from(session :: Mate.Session.t(), src :: String.t(), dest :: String.t()) ::
  {:ok, State.t()}

Copy a file from remote to local

Link to this callback

copy_to(session, src, dest)

View Source

Specs

copy_to(session :: Mate.Session.t(), src :: String.t(), dest :: String.t()) ::
  {:ok, State.t()}

Copy a file from local to remote

Link to this callback

exec(session, command, args)

View Source

Specs

exec(session :: Mate.Session.t(), command :: String.t(), args :: [String.t()]) ::
  {:ok, State.t()}

Executes a command using the driver

Specs

start(session :: Mate.Session.t(), host :: String.t()) ::
  {:ok, Mate.Session.t()}

Starts the driver, for example create an SSH connection, start a docker container, or whatever else might be needed for your new session.