From 5129322fc273f0989a6d76fc9f3a231604173fd8 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 17 Mar 2015 15:25:06 +1100 Subject: [PATCH] Reworked the public interface for mount options. --- mounted_file_system.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mounted_file_system.go b/mounted_file_system.go index 586ba13..c7df5e5 100644 --- a/mounted_file_system.go +++ b/mounted_file_system.go @@ -115,13 +115,20 @@ func (mfs *MountedFileSystem) mountAndServe( 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. // mfs.WaitForReady() must be called to find out whether the mount was // successful. func Mount( dir string, fs FileSystem, - options ...bazilfuse.MountOption) (mfs *MountedFileSystem, err error) { + config *MountConfig) (mfs *MountedFileSystem, err error) { // Create a server object. server, err := newServer(fs) if err != nil { @@ -136,7 +143,7 @@ func Mount( } // Mount in the background. - go mfs.mountAndServe(server, options) + go mfs.mountAndServe(server, config.bazilfuseOptions()) return }