Exfuse.Server (exfuse v0.1.0)

Copy Markdown View Source

The server joins the FS implementation (the Exfuse.Fs callback module) to the port (which joins the Elixir run time to the OS / kernel).

Summary

Functions

Returns a specification to start this module under a supervisor.

Called by the Exfuse.MountSup supervisor, start_link starts an FS as a GenServer. The three arguments are the same as for Exfuse.mount/3.

Return a tuple representing the state of the FS. This PID of the GenServer process must be passed as an argument.

Called to stop an FS. A single argument, the PID of the server, is given. This is the same as Exfuse.umount/1 except it requires the PID of the GenServer process, instead of the mount point.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(mount_point, fs_mod, fs_opts)

@spec start_link(String.t(), module(), term()) :: {:ok, pid()} | {:error, term()}

Called by the Exfuse.MountSup supervisor, start_link starts an FS as a GenServer. The three arguments are the same as for Exfuse.mount/3.

status(pid, timeout \\ 5000)

@spec status(pid(), timeout()) :: {String.t(), atom(), term(), integer()}

Return a tuple representing the state of the FS. This PID of the GenServer process must be passed as an argument.

The tuple elements are the mount point, callback module, the internal state of the callback module and the OS PID of the port process.

stop(pid)

@spec stop(pid()) :: :ok

Called to stop an FS. A single argument, the PID of the server, is given. This is the same as Exfuse.umount/1 except it requires the PID of the GenServer process, instead of the mount point.