This commit is contained in:
royalcat 2023-12-27 00:14:36 +03:00
parent cd6cf8dd74
commit 5f8d497de1
13 changed files with 4 additions and 4 deletions
src/export/nfs

16
src/export/nfs/handler.go Normal file
View file

@ -0,0 +1,16 @@
package nfs
import (
"git.kmsign.ru/royalcat/tstor/src/host/vfs"
nfs "github.com/willscott/go-nfs"
nfshelper "github.com/willscott/go-nfs/helpers"
)
func NewNFSv3Handler(fs vfs.Filesystem) (nfs.Handler, error) {
bfs := &billyFsWrapper{fs: fs}
handler := nfshelper.NewNullAuthHandler(bfs)
cacheHelper := nfshelper.NewCachingHandler(handler, 1024*16)
// cacheHelper := NewCachingHandler(handler)
return cacheHelper, nil
}