file_system v0.2.1 FileSystem.Backend behaviour

FileSystem Backend Behaviour.

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

Functions

backend(backend)
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.

Callbacks

bootstrap()
bootstrap() :: :ok | {:error, atom}
known_events()
known_events() :: [atom]
supported_systems()
supported_systems() :: [{atom, atom}]