Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
jacobsa-fuse
Commits
5129322f
Commit
5129322f
authored
Mar 17, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reworked the public interface for mount options.
parent
2d10e033
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
mounted_file_system.go
mounted_file_system.go
+9
-2
No files found.
mounted_file_system.go
View file @
5129322f
...
@@ -115,13 +115,20 @@ func (mfs *MountedFileSystem) mountAndServe(
...
@@ -115,13 +115,20 @@ func (mfs *MountedFileSystem) mountAndServe(
close
(
mfs
.
joinStatusAvailable
)
close
(
mfs
.
joinStatusAvailable
)
}
}
// Optional configuration accepted by Mount.
type
MountConfig
struct
{
}
// Convert to mount options to be passed to package bazilfuse.
func
(
c
*
MountConfig
)
bazilfuseOptions
()
[]
bazilfuse
.
MountOption
// Attempt to mount the supplied file system on the given directory.
// Attempt to mount the supplied file system on the given directory.
// mfs.WaitForReady() must be called to find out whether the mount was
// mfs.WaitForReady() must be called to find out whether the mount was
// successful.
// successful.
func
Mount
(
func
Mount
(
dir
string
,
dir
string
,
fs
FileSystem
,
fs
FileSystem
,
options
...
bazilfuse
.
MountOption
)
(
mfs
*
MountedFileSystem
,
err
error
)
{
config
*
MountConfig
)
(
mfs
*
MountedFileSystem
,
err
error
)
{
// Create a server object.
// Create a server object.
server
,
err
:=
newServer
(
fs
)
server
,
err
:=
newServer
(
fs
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -136,7 +143,7 @@ func Mount(
...
@@ -136,7 +143,7 @@ func Mount(
}
}
// Mount in the background.
// Mount in the background.
go
mfs
.
mountAndServe
(
server
,
options
)
go
mfs
.
mountAndServe
(
server
,
config
.
bazilfuseOptions
()
)
return
return
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment