file_system v0.2.2 FileSystem.Backend behaviour View Source

FileSystem Backend Behaviour.

Link to this section Summary

Functions

Get and validate backend module, return {:ok, backend_module} when success and return {:error, reason} when fail. When nil is given, will return default backend by os. When a custom module is given, make sure start_link/1, bootstrap/0 and supported_system/0 are defnied

Link to this section Functions

Link to this function backend(backend) View Source
backend(:atom) :: {:ok, atom} | {:error, atom}

Get and validate backend module, return {:ok, backend_module} when success and return {:error, reason} when fail. When nil is given, will return default backend by os. When a custom module is given, make sure start_link/1, bootstrap/0 and supported_system/0 are defnied.

Link to this section Callbacks

Link to this callback bootstrap() View Source
bootstrap() :: :ok | {:error, atom}
Link to this callback known_events() View Source
known_events() :: [atom]
Link to this callback supported_systems() View Source
supported_systems() :: [{atom, atom}]