ONC RPC handler for MOUNT v3 (program 100005, version 3) — see RFC 1813 appendix I.
Implements the six MOUNT v3 procedures:
| Proc | Name |
|---|---|
| 0 | NULL |
| 1 | MNT |
| 2 | DUMP |
| 3 | UMNT |
| 4 | UMNTALL |
| 5 | EXPORT |
Export resolution is delegated to a Tahr.Mount.Backend
module; the handler stays storage-agnostic.
Wiring
Pass the backend module via the dispatcher's program registry
using with_backend/1:
programs = %{100_005 => %{3 => Tahr.Mount.Handler.with_backend(MyBackend)}}with_backend/1 returns a tiny shim module that conforms to the
Tahr.RPC.Handler callback and stamps MyBackend into the
call's ctx so the dispatcher's stateless invocation can still
reach the backend.
Alternatively, set :nfs_mount_backend on the dispatcher ctx and
invoke this module directly — used by the test suite.
Summary
Functions
MOUNT program number (always 100005).
MOUNT version this handler implements (always 3).
Build a thin handler module that dispatches to backend. Since
Tahr.RPC.Dispatcher only carries module references, this
generates a tiny anonymous-named module per backend that delegates
back into this module's handle_call/4 with the backend stashed
in ctx.
Functions
@spec program() :: 100_005
MOUNT program number (always 100005).
@spec version() :: 3
MOUNT version this handler implements (always 3).
Build a thin handler module that dispatches to backend. Since
Tahr.RPC.Dispatcher only carries module references, this
generates a tiny anonymous-named module per backend that delegates
back into this module's handle_call/4 with the backend stashed
in ctx.