Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MountServer ¶
type MountServer interface { // Mount executes the mount program on the Target. Mount(op trace.Operation) (Target, error) // Unmount terminates the Mount on the Target. Unmount(op trace.Operation) error URL() (*url.URL, error) }
MountServer is an interface used to communicate with network attached storage.
type NfsMount ¶
type NfsMount struct { // Hostname is the name to authenticate with to the target as Hostname string // UID and GID are the user id and group id to authenticate with the target UID, GID uint32 // The URL (host + path) of the NFS server and target path TargetURL *url.URL // contains filtered or unexported fields }
NfsMount is used to wrap a MountServer to do the Mount()/Unmount() and Close()
type Target ¶
type Target interface { // Open opens a file on the Target in RD_ONLY Open(path string) (io.ReadCloser, error) // OpenFile opens a file on the Target with the given mode OpenFile(path string, perm os.FileMode) (io.ReadWriteCloser, error) // Mkdir creates a directory at the given path Mkdir(path string, perm os.FileMode) ([]byte, error) // RemoveAll deletes Directory recursively RemoveAll(Path string) error // ReadDir reads the dirents in the given directory ReadDir(path string) ([]os.FileInfo, error) // Lookup reads os.FileInfo for the given path Lookup(path string) (os.FileInfo, []byte, error) }
Target is the filesystem interface for performing actions against attached storage.
Click to show internal directories.
Click to hide internal directories.