github.com/mattyr/nomad@v0.3.3-0.20160919021406-3485a065154a/client/allocdir/alloc_dir_windows.go (about) 1 package allocdir 2 3 import ( 4 "errors" 5 "os" 6 "path/filepath" 7 ) 8 9 var ( 10 // SharedAllocContainerPath is the path inside container for mounted 11 // directory shared across tasks in a task group. 12 SharedAllocContainerPath = filepath.Join("c:\\", SharedAllocName) 13 14 // TaskLocalContainer is the path inside a container for mounted directory 15 // for local storage. 16 TaskLocalContainerPath = filepath.Join("c:\\", TaskLocal) 17 18 // TaskSecretsContainerPath is the path inside a container for mounted 19 // secrets directory 20 TaskSecretsContainerPath = filepath.Join("c:\\", TaskSecrets) 21 ) 22 23 func (d *AllocDir) linkOrCopy(src, dst string, perm os.FileMode) error { 24 return fileCopy(src, dst, perm) 25 } 26 27 // The windows version does nothing currently. 28 func (d *AllocDir) mountSharedDir(dir string) error { 29 return errors.New("Mount on Windows not supported.") 30 } 31 32 // createSecretDir creates the secrets dir folder at the given path 33 func (d *AllocDir) createSecretDir(dir string) error { 34 return os.MkdirAll(dir, 0777) 35 } 36 37 // removeSecretDir removes the secrets dir folder 38 func (d *AllocDir) removeSecretDir(dir string) error { 39 return os.RemoveAll(dir) 40 } 41 42 // The windows version does nothing currently. 43 func (d *AllocDir) dropDirPermissions(path string) error { 44 return nil 45 } 46 47 // The windows version does nothing currently. 48 func (d *AllocDir) unmountSharedDir(dir string) error { 49 return nil 50 } 51 52 // MountSpecialDirs mounts the dev and proc file system on the chroot of the 53 // task. It's a no-op on windows. 54 func (d *AllocDir) MountSpecialDirs(taskDir string) error { 55 return nil 56 } 57 58 // unmountSpecialDirs unmounts the dev and proc file system from the chroot 59 func (d *AllocDir) unmountSpecialDirs(taskDir string) error { 60 return nil 61 }