Comments (5)
Thanks for the feedback! (Sry for being slow)
Currently working in https://github.com/willscott/go-nfs/tree/feat/iofs
A bit confused and not too sure what's the best way to 'limit' how much of the file system they expose. I'm thinking of limiting it by using a wrapper. Something like how the change file attribute interface is only available by using certain wrappers in here
Also, I think if you pass in an os.DirFS
without a wrapper it would be a read-only fs.
Looking into setting up a memfs
and is currently choosing between wrapping a billy.fs or an afero.fs or both. billy.fs wrapper should be a better choice as it will provide backwards compatibility. Let me know your thoughts about this.
from go-nfs.
@willscott What's your thoughts about switching from billy to io/fs?
from go-nfs.
I'm happy to see this happen. I think the main thing is that my understanding is that there is not yet a clear standardization on what the extension of the core io/fs interface would be for mutation / changing. E.g. how the methods expressed in the Change
link above should be conveyed back to the filesystem.
from go-nfs.
@willscott been playing around with io/fs and somewhat got a working fork https://github.com/scorpionknifes/go-nfs. Currently basing mutation by following os.DirFS
and only the osnfs example works. Just want to get some feedback and thoughts about it.
I'm planning to get memfs working and write some tests (the fork is still in very early stages)
from go-nfs.
Cool!
I'll add you to this repo so you can work on a branch here and we can get this into a PR and merged as you get happy with it.
-
You have each specific method (
StatFS
,CreateFS
, etc) as a separate interface.- Can you re-use the upstream interface definitions where they exist, e.g.
io/fs.StatFS
?
- Can you re-use the upstream interface definitions where they exist, e.g.
-
We should define an additional interface layer to be clear about what capabilities are needed for different types of mounts
- (e.g. you don't need
WriteFile
if you supportWriteAtFile
as well, but you do needMkdirAll
if you want a writable NFS mount) - I think there's probably a 'readable NFS mount' layer, and then 2 ways it can be extended - there's an additional set of interfaces to implement if you want to expose a 'read/write NFS mount', and a different set to expose a 'permissioned NFS mount'
- (e.g. you don't need
-
There should be some way for the user to 'limit' how much of the filesystem they expose: If i pass in a
DirFS
, it will currently be a read/write filesystem. It would be good to be able to specify somehow a bit more cleanly (right now i think it would be through a custom handler) that i want to set up the filesystem in read-only mode even if it has the writable methods on it.
from go-nfs.
Related Issues (20)
- There are still places where FileID zero is returned, which confuses linux HOT 9
- Still getting stale file handle issues: see #100 HOT 3
- `onRename` errors out with "comparing uncomparable type" HOT 4
- if `fs.Remove` fails with `non-empty directory`, the server should forward that. HOT 1
- Incorrect handling of an open file's `Name()` HOT 1
- If `Read` is above a certain size, it will return nothing HOT 1
- onReadDirPlus with small cache yields no results, but no error HOT 2
- Some Write calls leads to data loss HOT 30
- A git clone will lead to the server displaying files with corrupted permissions HOT 9
- Unnecessary error messages for non-errors HOT 8
- make `onlookup` use stat rather than readdir HOT 1
- Removing directory leads to `Stale file handle` HOT 3
- Symbolic Links Cause Stale NFS File Handles HOT 1
- tagged releases
- fs.Stat is called when fs.Lstat should be called HOT 5
- support backing systems without exposed fileids
- Sockets don't work through mount HOT 11
- "Illegal instruction" when trying to run `su user` in chroot in mount HOT 29
- `flock` hangs HOT 3
- GETATTR does not set fhandle in returned struct HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-nfs.