Mate.Storage behaviour (Mate v0.1.7) View Source

This is the behaviour for Mate Storage engines

The idea behind supporting multiple storage engines is allowing the user to decide how and where they want to upload their completed builds. By default it will upload and download using SCP but for example you might be interested in using S3 or any other source.

Link to this section Summary

Callbacks

Close the connection to your storage host.

Connect to your storage host.

Downloads the given file from storage to the deploy host(s)

Upload the given file from the build server to storage.

Link to this section Callbacks

Link to this callback

close(session)

View Source (optional)

Specs

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

Close the connection to your storage host.

Link to this callback

connect(session)

View Source (optional)

Specs

connect(session :: Mate.Session.t()) ::
  {:ok, Mate.Session.t()} | {:error, String.t()}

Connect to your storage host.

Specs

download(session :: Mate.Session.t(), file :: String.t()) ::
  {:ok, Mate.Session.t()} | {:error, String.t()}

Downloads the given file from storage to the deploy host(s)

Specs

upload(session :: Mate.Session.t(), file :: String.t()) ::
  {:ok, Mate.Session.t()} | {:error, String.t()}

Upload the given file from the build server to storage.

Link to this section Functions

Specs

download(session :: Mate.Session.t(), file :: String.t()) ::
  {:ok, Mate.Session.t()} | {:error, String.t()}

Specs

upload(session :: Mate.Session.t(), file :: String.t()) ::
  {:ok, Mate.Session.t()} | {:error, String.t()}