-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NFS3 demo server #205
base: main
Are you sure you want to change the base?
NFS3 demo server #205
Conversation
8659ab1
to
28251d6
Compare
@@ -135,6 +143,7 @@ let package = Package( | |||
dependencies: [ | |||
.package(url: "https://github.com/apple/swift-nio.git", from: "2.42.0"), | |||
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), | |||
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we'd avoid the swift-log dependency here. Any reason we can't print
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use the logger to carry metadata through. So if you get an error in your file system, you can log and you'll get the precise connection etc associated. For production that's important and given that I had the code I left it here too because I thought the swift-log dependency wouldn't be too bad.
But I can take it out, lose the metadata propagation and just use print(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's definitely not too bad, and I could be talked out of this, but in general keeping the dependency tree small is kinda nice. No strong feelings though, happy for someone to try to talk me out of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar position but the other way around. Happy either way really ;)
Motivation:
Previously (#155), we added support for the NFS3 protocol. But without actually having a demo server, that's not actually very much fun.
Modifications:
Add a demo server which can mount a simple dummy file system in user space.
Result:
Better demo
How to try this out? Just
swift run NIOExtrasNFS3Demo
and then you should seewhich means it successfully mounted the filesystem at
/tmp/mount
. You can then check it outto unmount press Ctrl+C in the
NIOExtrasNFS3Demo
process.