go-nfs
go-nfs copied to clipboard
Added helpers/persistenthandler
This highlights an aspect of the Handler interface that I'm going to see if I can take a quick pass at improving. Currently Handlers receive a Mount request as a new client connects to the server, but don't have a way to see the subsequent Unmount. In this case, it would be useful to keep track of handles in relation to the associated Mount so that they can be freed once the client Unmount's. Tagging the client can be done by wrapping the billy.Filesystem with an additional struct, but there's currently no way for this handler to know when it's safe to discard handles.
Added the unmount handler method in https://github.com/willscott/go-nfs/pull/28. I'll take a pass at making use of that for freeing handles in this PR later.
Seems to need rebase