This library is a pure-Go client for NFSv4 (NFSv3 is NOT supported at all). It's mostly
designed and tested for AWS EFS, but will work fine with Linux's nfs4-server or userspace-based
Ganesha. It's fully synchronous, does nothing behind your back and fully supports
context.Context-based cancellation and deadlines.
It's also a fairly minimal library with lots of limitations:
- No support for locking.
- No support for reconnection and session resumption.
- Minimalistic API.
- No support for ACLs or extended attributes.
- No support for any authentication methods.
See cmd/main/runtests.go for the usage examples.
If you need to regenerate the XDR bindings, then there's some manual work involved.
First use:
go run github.com/xdrpp/goxdr/cmd/goxdr -B -enum-comments -p internal internal/nfs4.x > internal/nfs4.go
go run github.com/xdrpp/goxdr/cmd/goxdr -b -enum-comments -p internal internal/rpc.x > internal/rpc.goAfter this, manually do the following:
- Rename
_uto_U. - Rename
xdrProc_NFSPROC4_COMPOUNDtoXdrProc_NFSPROC4_COMPOUND - Rename
xdrProc_NFSPROC4_NULLtoXdrProc_NFSPROC4_NULL - Change all the methods like
XDR_Offset4(v *Offset4) XdrType_Offset4to return pointers (not values).