exocci v0.1.0 OCCI.Backend behaviour View Source

Defines backend behaviour

When use OCCI.Backend, provides default implementations for init/1 and terminate/2

Link to this section Summary

Link to this section Types

Link to this type t() View Source
t() :: %OCCI.Backend{args: term, id: term, mod: term, mountpoint: term}

Link to this section Callbacks

Link to this callback delete(arg0, state) View Source
delete(OCCI.Node.location, state) ::
  {:reply, :ok | :error, new_state} |
  {:stop, reason :: term, new_state} when state: term, new_state: term
Link to this callback fetch(arg0, state) View Source
fetch(OCCI.Node.location, state) ::
  {:reply, OCCI.Model.Core.Entity.t | nil, new_state} |
  {:stop, reason :: term, new_state} when state: term, new_state: term
Link to this callback init(args) View Source
init(args :: any) ::
  {:ok, state} |
  {:stop, reason :: any} when state: any
Link to this callback lookup(arg0, state) View Source
lookup(OCCI.Filter.t, state) ::
  {:reply, [OCCI.Model.Core.Entity.t], new_state} |
  {:stop, reason :: term, new_state} when state: term, new_state: term
Link to this callback store(arg0, state) View Source
store(OCCI.Model.Core.Entity.t, state) ::
  {:reply, OCCI.Model.Core.Entity.t, new_state} |
  {:stop, reason :: term, new_state} when state: term, new_state: term
Link to this callback terminate(reason, state) View Source
terminate(reason :: :atom, state) :: :ok when state: term