Documentation
¶
Overview ¶
Copyright 2017 The GoStor Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- type Config
- type CreateRequest
- type FlushRequest
- type FsyncRequest
- type GetattrRequest
- type LinkRequest
- type LookupRequest
- type MkdirRequest
- type MknodRequest
- type OpenFlags
- type RaftClusterStatusResponse
- type ReleaseFlags
- type ReleaseRequest
- type RemoveRequest
- type RenameRequest
- type SetattrRequest
- type SetattrValid
- func (fl SetattrValid) Atime() bool
- func (fl SetattrValid) AtimeNow() bool
- func (fl SetattrValid) Bkuptime() bool
- func (fl SetattrValid) Chgtime() bool
- func (fl SetattrValid) Crtime() bool
- func (fl SetattrValid) Flags() bool
- func (fl SetattrValid) Gid() bool
- func (fl SetattrValid) Handle() bool
- func (fl SetattrValid) LockOwner() bool
- func (fl SetattrValid) Mode() bool
- func (fl SetattrValid) Mtime() bool
- func (fl SetattrValid) MtimeNow() bool
- func (fl SetattrValid) Size() bool
- func (fl SetattrValid) String() string
- func (fl SetattrValid) Uid() bool
- type SymlinkRequest
Constants ¶
const ( // GET operation OpsGetFileStatus = "GETFILESTATUS" OpsListStatus = "LISTSTATUS" // Get Content Summary of a Directory OpsGetContentSummary = "GETCONTENTSUMMARY" // Get File Checksum OpsGetFileChecksum = "GETFILECHECKSUM" // DELETE operation OpsDelete = "DELETE" // PUT operation // Create and Write to a File OpsFileCreate = "CREATE" // Make a Directory OpsDirCreate = "MKDIRS" // Rename a File/Directory OpsRename = "RENAME" // Set Permission OpsSetPermission = "SETPERMISSION" // Set Access or Modification Time OpsSetTimes = "SETTIMES" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct { Name string Flags OpenFlags Mode os.FileMode // Umask of the request. Not supported on OS X. Umask os.FileMode }
A CreateRequest asks to create and open a file (not a directory).
type FlushRequest ¶
A FlushRequest asks for the current state of an open file to be flushed to storage, as when a file descriptor is being closed. A single opened Handle may receive multiple FlushRequests over its lifetime.
type FsyncRequest ¶
type GetattrRequest ¶
type GetattrRequest struct {
Flags uint32 // bit flags
}
A GetattrRequest asks for the metadata for the file denoted by r.Node.
type LinkRequest ¶
A LinkRequest is a request to create a hard link.
type LookupRequest ¶
type LookupRequest struct {
Name string
}
A LookupRequest asks to look up the given name in the directory named by r.Node.
type MkdirRequest ¶
type MknodRequest ¶
type OpenFlags ¶
type OpenFlags uint32
OpenFlags are the O_FOO flags passed to open/create/etc calls. For example, os.O_WRONLY | os.O_APPEND.
type ReleaseRequest ¶
type ReleaseRequest struct { Dir bool // is this Releasedir? Flags OpenFlags // flags from OpenRequest ReleaseFlags ReleaseFlags LockOwner uint32 }
A ReleaseRequest asks to release (close) an open file handle.
type RemoveRequest ¶
A RemoveRequest asks to remove a file or directory from the directory r.Node.
type RenameRequest ¶
A RenameRequest is a request to rename a file.
type SetattrRequest ¶
type SetattrRequest struct { Valid SetattrValid Size uint64 Atime time.Time Mtime time.Time Mode os.FileMode Uid uint32 Gid uint32 // OS X only Bkuptime time.Time Chgtime time.Time Crtime time.Time Flags uint32 // see chflags(2) }
A SetattrRequest asks to change one or more attributes associated with a file, as indicated by Valid.
type SetattrValid ¶
type SetattrValid uint32
The SetattrValid are bit flags describing which fields in the SetattrRequest are included in the change.
const ( SetattrMode SetattrValid = 1 << 0 SetattrUid SetattrValid = 1 << 1 SetattrGid SetattrValid = 1 << 2 SetattrSize SetattrValid = 1 << 3 SetattrAtime SetattrValid = 1 << 4 SetattrMtime SetattrValid = 1 << 5 SetattrHandle SetattrValid = 1 << 6 // Linux only(?) SetattrAtimeNow SetattrValid = 1 << 7 SetattrMtimeNow SetattrValid = 1 << 8 SetattrLockOwner SetattrValid = 1 << 9 // http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg27852.html // OS X only SetattrCrtime SetattrValid = 1 << 28 SetattrChgtime SetattrValid = 1 << 29 SetattrBkuptime SetattrValid = 1 << 30 SetattrFlags SetattrValid = 1 << 31 )
func (SetattrValid) Atime ¶
func (fl SetattrValid) Atime() bool
func (SetattrValid) AtimeNow ¶
func (fl SetattrValid) AtimeNow() bool
func (SetattrValid) Bkuptime ¶
func (fl SetattrValid) Bkuptime() bool
func (SetattrValid) Chgtime ¶
func (fl SetattrValid) Chgtime() bool
func (SetattrValid) Crtime ¶
func (fl SetattrValid) Crtime() bool
func (SetattrValid) Flags ¶
func (fl SetattrValid) Flags() bool
func (SetattrValid) Gid ¶
func (fl SetattrValid) Gid() bool
func (SetattrValid) Handle ¶
func (fl SetattrValid) Handle() bool
func (SetattrValid) LockOwner ¶
func (fl SetattrValid) LockOwner() bool
func (SetattrValid) Mode ¶
func (fl SetattrValid) Mode() bool
func (SetattrValid) Mtime ¶
func (fl SetattrValid) Mtime() bool
func (SetattrValid) MtimeNow ¶
func (fl SetattrValid) MtimeNow() bool
func (SetattrValid) Size ¶
func (fl SetattrValid) Size() bool
func (SetattrValid) String ¶
func (fl SetattrValid) String() string
func (SetattrValid) Uid ¶
func (fl SetattrValid) Uid() bool
type SymlinkRequest ¶
A SymlinkRequest is a request to create a symlink making NewName point to Target.