Documentation
¶
Index ¶
- Constants
- type Entry
- type EntryType
- type FileHandle
- func (handle *FileHandle) Close() error
- func (handle *FileHandle) GetOffset() int64
- func (handle *FileHandle) IsReadMode() bool
- func (handle *FileHandle) IsWriteMode() bool
- func (handle *FileHandle) Read(length int) ([]byte, error)
- func (handle *FileHandle) ReadAt(offset int64, length int) ([]byte, error)
- func (handle *FileHandle) Seek(offset int64, whence types.Whence) (int64, error)
- func (handle *FileHandle) ToString() string
- func (handle *FileHandle) Write(data []byte) error
- func (handle *FileHandle) WriteAt(offset int64, data []byte) error
- type FileSystem
- func NewFileSystem(account *types.IRODSAccount, config *FileSystemConfig) (*FileSystem, error)
- func NewFileSystemWithDefault(account *types.IRODSAccount, applicationName string) (*FileSystem, error)
- func NewFileSystemWithSessionConfig(account *types.IRODSAccount, sessConfig *session.IRODSSessionConfig) (*FileSystem, error)
- func (fs *FileSystem) AddMetadata(irodsPath string, attName string, attValue string, attUnits string) error
- func (fs *FileSystem) AddUserMetadata(user string, avuid int64, attName, attValue, attUnits string) error
- func (fs *FileSystem) ClearCache()
- func (fs *FileSystem) Connections() int
- func (fs *FileSystem) CopyFile(srcPath string, destPath string) error
- func (fs *FileSystem) CopyFileToFile(srcPath string, destPath string) error
- func (fs *FileSystem) CreateFile(path string, resource string) (*FileHandle, error)
- func (fs *FileSystem) DeleteMetadata(irodsPath string, attName string, attValue string, attUnits string) error
- func (fs *FileSystem) DeleteUserMetadata(user string, avuid int64, attName, attValue, attUnits string) error
- func (fs *FileSystem) DownloadFile(irodsPath string, resource string, localPath string) error
- func (fs *FileSystem) DownloadFileParallel(irodsPath string, resource string, localPath string, taskNum int) error
- func (fs *FileSystem) DownloadFileParallelInBlocksAsync(irodsPath string, resource string, localPath string, blockLength int64, ...) (chan int64, chan error)
- func (fs *FileSystem) Exists(path string) bool
- func (fs *FileSystem) ExistsDir(path string) bool
- func (fs *FileSystem) ExistsFile(path string) bool
- func (fs *FileSystem) InvalidateCache(path string)
- func (fs *FileSystem) List(path string) ([]*Entry, error)
- func (fs *FileSystem) ListACLs(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListACLsWithGroupUsers(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListDirACLs(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListDirACLsWithGroupUsers(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListFileACLs(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListFileACLsWithGroupUsers(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListGroupUsers(group string) ([]*types.IRODSUser, error)
- func (fs *FileSystem) ListGroups() ([]*types.IRODSUser, error)
- func (fs *FileSystem) ListMetadata(path string) ([]*types.IRODSMeta, error)
- func (fs *FileSystem) ListUserGroups(user string) ([]*types.IRODSUser, error)
- func (fs *FileSystem) ListUserMetadata(user string) ([]*types.IRODSMeta, error)
- func (fs *FileSystem) ListUsers() ([]*types.IRODSUser, error)
- func (fs *FileSystem) MakeDir(path string, recurse bool) error
- func (fs *FileSystem) OpenFile(path string, resource string, mode string) (*FileHandle, error)
- func (fs *FileSystem) Release()
- func (fs *FileSystem) RemoveDir(path string, recurse bool, force bool) error
- func (fs *FileSystem) RemoveFile(path string, force bool) error
- func (fs *FileSystem) RenameDir(srcPath string, destPath string) error
- func (fs *FileSystem) RenameDirToDir(srcPath string, destPath string) error
- func (fs *FileSystem) RenameFile(srcPath string, destPath string) error
- func (fs *FileSystem) RenameFileToFile(srcPath string, destPath string) error
- func (fs *FileSystem) ReplicateFile(path string, resource string, update bool) error
- func (fs *FileSystem) SearchByMeta(metaname string, metavalue string) ([]*Entry, error)
- func (fs *FileSystem) Stat(path string) (*Entry, error)
- func (fs *FileSystem) StatDir(path string) (*Entry, error)
- func (fs *FileSystem) StatFile(path string) (*Entry, error)
- func (fs *FileSystem) TruncateFile(path string, size int64) error
- func (fs *FileSystem) UploadFile(localPath string, irodsPath string, resource string, replicate bool) error
- func (fs *FileSystem) UploadFileParallel(localPath string, irodsPath string, resource string, taskNum int, ...) error
- func (fs *FileSystem) UploadFileParallelInBlocksAsync(localPath string, irodsPath string, resource string, blockLength int64, ...) (chan int64, chan error)
- type FileSystemCache
- func (cache *FileSystemCache) AddDirACLsCache(path string, accesses []*types.IRODSAccess)
- func (cache *FileSystemCache) AddDirCache(path string, entries []string)
- func (cache *FileSystemCache) AddEntryCache(entry *Entry)
- func (cache *FileSystemCache) AddFileACLsCache(path string, accesses []*types.IRODSAccess)
- func (cache *FileSystemCache) AddGroupUsersCache(group string, users []*types.IRODSUser)
- func (cache *FileSystemCache) AddGroupsCache(groups []*types.IRODSUser)
- func (cache *FileSystemCache) AddMetadataCache(path string, metas []*types.IRODSMeta)
- func (cache *FileSystemCache) AddUserGroupsCache(user string, groups []*types.IRODSUser)
- func (cache *FileSystemCache) AddUsersCache(users []*types.IRODSUser)
- func (cache *FileSystemCache) ClearDirACLsCache()
- func (cache *FileSystemCache) ClearDirCache()
- func (cache *FileSystemCache) ClearEntryCache()
- func (cache *FileSystemCache) ClearFileACLsCache()
- func (cache *FileSystemCache) ClearMetadataCache()
- func (cache *FileSystemCache) GetDirACLsCache(path string) []*types.IRODSAccess
- func (cache *FileSystemCache) GetDirCache(path string) []string
- func (cache *FileSystemCache) GetEntryCache(path string) *Entry
- func (cache *FileSystemCache) GetFileACLsCache(path string) []*types.IRODSAccess
- func (cache *FileSystemCache) GetGroupUsersCache(group string) []*types.IRODSUser
- func (cache *FileSystemCache) GetGroupsCache() []*types.IRODSUser
- func (cache *FileSystemCache) GetMetadataCache(path string) []*types.IRODSMeta
- func (cache *FileSystemCache) GetUserGroupsCache(user string) []*types.IRODSUser
- func (cache *FileSystemCache) GetUsersCache() []*types.IRODSUser
- func (cache *FileSystemCache) RemoveDirACLsCache(path string)
- func (cache *FileSystemCache) RemoveDirCache(path string)
- func (cache *FileSystemCache) RemoveEntryCache(path string)
- func (cache *FileSystemCache) RemoveFileACLsCache(path string)
- func (cache *FileSystemCache) RemoveGroupUsersCache(group string)
- func (cache *FileSystemCache) RemoveGroupsCache()
- func (cache *FileSystemCache) RemoveMetadataCache(path string)
- func (cache *FileSystemCache) RemoveUserGroupsCache(user string)
- func (cache *FileSystemCache) RemoveUsersCache()
- type FileSystemConfig
Constants ¶
const ( // FileSystemConnectionMaxMin is a minimum number of connection max value FileSystemConnectionMaxMin = 5 // FileSystemConnectionMaxDefault is a default number of connection max value FileSystemConnectionMaxDefault = 10 // ConnectionLifespanDefault is a default lifespan of a connection ConnectionLifespanDefault = 1 * time.Hour // FileSystemTimeoutDefault is a default timeout value FileSystemTimeoutDefault = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶ added in v0.5.2
type Entry struct {
ID int64
Type EntryType
Name string
Path string
Owner string
Size int64
CreateTime time.Time
ModifyTime time.Time
CheckSum string
//
Internal interface{} // IRODSDataObject or IRODSCollection
}
Entry ...
type FileHandle ¶
type FileHandle struct {
ID string
FileSystem *FileSystem
Connection *connection.IRODSConnection
IRODSHandle *types.IRODSFileHandle
Entry *Entry
Offset int64
OpenMode types.FileOpenMode
Mutex sync.Mutex
}
FileHandle ...
func (*FileHandle) GetOffset ¶
func (handle *FileHandle) GetOffset() int64
GetOffset returns current offset
func (*FileHandle) IsReadMode ¶
func (handle *FileHandle) IsReadMode() bool
IsReadMode returns true if file is opened with read mode
func (*FileHandle) IsWriteMode ¶
func (handle *FileHandle) IsWriteMode() bool
IsWriteMode returns true if file is opened with write mode
func (*FileHandle) Read ¶
func (handle *FileHandle) Read(length int) ([]byte, error)
Read reads the file
func (*FileHandle) ReadAt ¶ added in v0.5.5
func (handle *FileHandle) ReadAt(offset int64, length int) ([]byte, error)
ReadAt reads data from given offset
func (*FileHandle) ToString ¶
func (handle *FileHandle) ToString() string
ToString stringifies the object
type FileSystem ¶
type FileSystem struct {
// contains filtered or unexported fields
}
FileSystem provides a file-system like interface
func NewFileSystem ¶
func NewFileSystem(account *types.IRODSAccount, config *FileSystemConfig) (*FileSystem, error)
NewFileSystem creates a new FileSystem
func NewFileSystemWithDefault ¶
func NewFileSystemWithDefault(account *types.IRODSAccount, applicationName string) (*FileSystem, error)
NewFileSystemWithDefault creates a new FileSystem with default configurations
func NewFileSystemWithSessionConfig ¶ added in v0.5.5
func NewFileSystemWithSessionConfig(account *types.IRODSAccount, sessConfig *session.IRODSSessionConfig) (*FileSystem, error)
NewFileSystemWithSessionConfig creates a new FileSystem with custom session configurations
func (*FileSystem) AddMetadata ¶ added in v0.4.0
func (fs *FileSystem) AddMetadata(irodsPath string, attName string, attValue string, attUnits string) error
AddMetadata adds a metadata for the path
func (*FileSystem) AddUserMetadata ¶ added in v0.4.5
func (fs *FileSystem) AddUserMetadata(user string, avuid int64, attName, attValue, attUnits string) error
AddUserMetadata adds a user metadata
func (*FileSystem) ClearCache ¶
func (fs *FileSystem) ClearCache()
ClearCache clears all file system caches
func (*FileSystem) Connections ¶ added in v0.5.5
func (fs *FileSystem) Connections() int
Connections counts current established connections
func (*FileSystem) CopyFile ¶
func (fs *FileSystem) CopyFile(srcPath string, destPath string) error
CopyFile copies a file
func (*FileSystem) CopyFileToFile ¶
func (fs *FileSystem) CopyFileToFile(srcPath string, destPath string) error
CopyFileToFile copies a file
func (*FileSystem) CreateFile ¶
func (fs *FileSystem) CreateFile(path string, resource string) (*FileHandle, error)
CreateFile opens a new file for write
func (*FileSystem) DeleteMetadata ¶ added in v0.4.0
func (fs *FileSystem) DeleteMetadata(irodsPath string, attName string, attValue string, attUnits string) error
DeleteMetadata deletes a metadata for the path
func (*FileSystem) DeleteUserMetadata ¶ added in v0.4.5
func (fs *FileSystem) DeleteUserMetadata(user string, avuid int64, attName, attValue, attUnits string) error
DeleteUserMetadata deletes a user metadata
func (*FileSystem) DownloadFile ¶
func (fs *FileSystem) DownloadFile(irodsPath string, resource string, localPath string) error
DownloadFile downloads a file to local
func (*FileSystem) DownloadFileParallel ¶ added in v0.5.2
func (fs *FileSystem) DownloadFileParallel(irodsPath string, resource string, localPath string, taskNum int) error
DownloadFileParallel downloads a file to local in parallel
func (*FileSystem) DownloadFileParallelInBlocksAsync ¶ added in v0.5.2
func (fs *FileSystem) DownloadFileParallelInBlocksAsync(irodsPath string, resource string, localPath string, blockLength int64, taskNum int) (chan int64, chan error)
DownloadFileParallelInBlocksAsync downloads a file to local in parallel
func (*FileSystem) Exists ¶
func (fs *FileSystem) Exists(path string) bool
Exists checks file/directory existence
func (*FileSystem) ExistsDir ¶
func (fs *FileSystem) ExistsDir(path string) bool
ExistsDir checks directory existence
func (*FileSystem) ExistsFile ¶
func (fs *FileSystem) ExistsFile(path string) bool
ExistsFile checks file existence
func (*FileSystem) InvalidateCache ¶
func (fs *FileSystem) InvalidateCache(path string)
InvalidateCache invalidates cache with the given path
func (*FileSystem) List ¶
func (fs *FileSystem) List(path string) ([]*Entry, error)
List lists all file system entries under the given path
func (*FileSystem) ListACLs ¶ added in v0.3.0
func (fs *FileSystem) ListACLs(path string) ([]*types.IRODSAccess, error)
ListACLs returns ACLs
func (*FileSystem) ListACLsWithGroupUsers ¶ added in v0.3.0
func (fs *FileSystem) ListACLsWithGroupUsers(path string) ([]*types.IRODSAccess, error)
ListACLsWithGroupUsers returns ACLs
func (*FileSystem) ListDirACLs ¶ added in v0.3.0
func (fs *FileSystem) ListDirACLs(path string) ([]*types.IRODSAccess, error)
ListDirACLs returns ACLs of a directory
func (*FileSystem) ListDirACLsWithGroupUsers ¶ added in v0.3.0
func (fs *FileSystem) ListDirACLsWithGroupUsers(path string) ([]*types.IRODSAccess, error)
ListDirACLsWithGroupUsers returns ACLs of a directory CAUTION: this can fail if a group contains a lot of users
func (*FileSystem) ListFileACLs ¶ added in v0.3.0
func (fs *FileSystem) ListFileACLs(path string) ([]*types.IRODSAccess, error)
ListFileACLs returns ACLs of a file
func (*FileSystem) ListFileACLsWithGroupUsers ¶ added in v0.3.0
func (fs *FileSystem) ListFileACLsWithGroupUsers(path string) ([]*types.IRODSAccess, error)
ListFileACLsWithGroupUsers returns ACLs of a file
func (*FileSystem) ListGroupUsers ¶ added in v0.3.0
func (fs *FileSystem) ListGroupUsers(group string) ([]*types.IRODSUser, error)
ListGroupUsers lists all users in a group
func (*FileSystem) ListGroups ¶ added in v0.4.5
func (fs *FileSystem) ListGroups() ([]*types.IRODSUser, error)
ListGroups lists all groups
func (*FileSystem) ListMetadata ¶ added in v0.4.0
func (fs *FileSystem) ListMetadata(path string) ([]*types.IRODSMeta, error)
ListMetadata lists metadata for the given path
func (*FileSystem) ListUserGroups ¶ added in v0.5.9
func (fs *FileSystem) ListUserGroups(user string) ([]*types.IRODSUser, error)
ListUserGroups lists all groups that a user belongs to
func (*FileSystem) ListUserMetadata ¶ added in v0.4.5
func (fs *FileSystem) ListUserMetadata(user string) ([]*types.IRODSMeta, error)
ListUserMetadata lists all user metadata
func (*FileSystem) ListUsers ¶ added in v0.4.5
func (fs *FileSystem) ListUsers() ([]*types.IRODSUser, error)
ListUsers lists all users
func (*FileSystem) MakeDir ¶
func (fs *FileSystem) MakeDir(path string, recurse bool) error
MakeDir creates a directory
func (*FileSystem) OpenFile ¶
func (fs *FileSystem) OpenFile(path string, resource string, mode string) (*FileHandle, error)
OpenFile opens an existing file for read/write
func (*FileSystem) RemoveDir ¶
func (fs *FileSystem) RemoveDir(path string, recurse bool, force bool) error
RemoveDir deletes a directory
func (*FileSystem) RemoveFile ¶
func (fs *FileSystem) RemoveFile(path string, force bool) error
RemoveFile deletes a file
func (*FileSystem) RenameDir ¶
func (fs *FileSystem) RenameDir(srcPath string, destPath string) error
RenameDir renames a dir
func (*FileSystem) RenameDirToDir ¶
func (fs *FileSystem) RenameDirToDir(srcPath string, destPath string) error
RenameDirToDir renames a dir
func (*FileSystem) RenameFile ¶
func (fs *FileSystem) RenameFile(srcPath string, destPath string) error
RenameFile renames a file
func (*FileSystem) RenameFileToFile ¶
func (fs *FileSystem) RenameFileToFile(srcPath string, destPath string) error
RenameFileToFile renames a file
func (*FileSystem) ReplicateFile ¶
func (fs *FileSystem) ReplicateFile(path string, resource string, update bool) error
ReplicateFile replicates a file
func (*FileSystem) SearchByMeta ¶ added in v0.4.3
func (fs *FileSystem) SearchByMeta(metaname string, metavalue string) ([]*Entry, error)
SearchByMeta searches all file system entries with given metadata
func (*FileSystem) Stat ¶
func (fs *FileSystem) Stat(path string) (*Entry, error)
Stat returns file status
func (*FileSystem) StatDir ¶
func (fs *FileSystem) StatDir(path string) (*Entry, error)
StatDir returns status of a directory
func (*FileSystem) StatFile ¶
func (fs *FileSystem) StatFile(path string) (*Entry, error)
StatFile returns status of a file
func (*FileSystem) TruncateFile ¶
func (fs *FileSystem) TruncateFile(path string, size int64) error
TruncateFile truncates a file
func (*FileSystem) UploadFile ¶
func (fs *FileSystem) UploadFile(localPath string, irodsPath string, resource string, replicate bool) error
UploadFile uploads a local file to irods
func (*FileSystem) UploadFileParallel ¶ added in v0.5.2
func (fs *FileSystem) UploadFileParallel(localPath string, irodsPath string, resource string, taskNum int, replicate bool) error
UploadFileParallel uploads a local file to irods in parallel
func (*FileSystem) UploadFileParallelInBlocksAsync ¶ added in v0.5.2
func (fs *FileSystem) UploadFileParallelInBlocksAsync(localPath string, irodsPath string, resource string, blockLength int64, taskNum int, replicate bool) (chan int64, chan error)
UploadFileParallelInBlocksAsync uploads a local file to irods in parallel
type FileSystemCache ¶
type FileSystemCache struct {
// contains filtered or unexported fields
}
FileSystemCache manages filesystem caches
func NewFileSystemCache ¶
func NewFileSystemCache(cacheTimeout time.Duration, cleanup time.Duration, cacheTimeoutPathMap map[string]time.Duration) *FileSystemCache
NewFileSystemCache creates a new FileSystemCache
func (*FileSystemCache) AddDirACLsCache ¶ added in v0.4.5
func (cache *FileSystemCache) AddDirACLsCache(path string, accesses []*types.IRODSAccess)
AddDirACLsCache adds a Dir ACLs cache
func (*FileSystemCache) AddDirCache ¶
func (cache *FileSystemCache) AddDirCache(path string, entries []string)
AddDirCache adds a dir cache
func (*FileSystemCache) AddEntryCache ¶
func (cache *FileSystemCache) AddEntryCache(entry *Entry)
AddEntryCache adds an entry cache
func (*FileSystemCache) AddFileACLsCache ¶ added in v0.4.5
func (cache *FileSystemCache) AddFileACLsCache(path string, accesses []*types.IRODSAccess)
AddFileACLsCache adds a File ACLs cache
func (*FileSystemCache) AddGroupUsersCache ¶ added in v0.3.0
func (cache *FileSystemCache) AddGroupUsersCache(group string, users []*types.IRODSUser)
AddGroupUsersCache adds a group user (users in a group) cache
func (*FileSystemCache) AddGroupsCache ¶ added in v0.4.5
func (cache *FileSystemCache) AddGroupsCache(groups []*types.IRODSUser)
AddGroupsCache adds a groups cache (cache of a list of all groups)
func (*FileSystemCache) AddMetadataCache ¶ added in v0.4.0
func (cache *FileSystemCache) AddMetadataCache(path string, metas []*types.IRODSMeta)
AddMetadataCache adds a metadata cache
func (*FileSystemCache) AddUserGroupsCache ¶ added in v0.5.9
func (cache *FileSystemCache) AddUserGroupsCache(user string, groups []*types.IRODSUser)
AddUserGroupsCache adds a user's groups (groups that a user belongs to) cache
func (*FileSystemCache) AddUsersCache ¶ added in v0.4.5
func (cache *FileSystemCache) AddUsersCache(users []*types.IRODSUser)
AddUsersCache adds a users cache (cache of a list of all users)
func (*FileSystemCache) ClearDirACLsCache ¶ added in v0.4.5
func (cache *FileSystemCache) ClearDirACLsCache()
ClearDirACLsCache clears all Dir ACLs caches
func (*FileSystemCache) ClearDirCache ¶
func (cache *FileSystemCache) ClearDirCache()
ClearDirCache clears all dir caches
func (*FileSystemCache) ClearEntryCache ¶
func (cache *FileSystemCache) ClearEntryCache()
ClearEntryCache clears all entry caches
func (*FileSystemCache) ClearFileACLsCache ¶ added in v0.4.5
func (cache *FileSystemCache) ClearFileACLsCache()
ClearFileACLsCache clears all File ACLs caches
func (*FileSystemCache) ClearMetadataCache ¶ added in v0.4.0
func (cache *FileSystemCache) ClearMetadataCache()
ClearMetadataCache clears all metadata caches
func (*FileSystemCache) GetDirACLsCache ¶ added in v0.4.5
func (cache *FileSystemCache) GetDirACLsCache(path string) []*types.IRODSAccess
GetDirACLsCache retrives a Dir ACLs cache
func (*FileSystemCache) GetDirCache ¶
func (cache *FileSystemCache) GetDirCache(path string) []string
GetDirCache retrives a dir cache
func (*FileSystemCache) GetEntryCache ¶
func (cache *FileSystemCache) GetEntryCache(path string) *Entry
GetEntryCache retrieves an entry cache
func (*FileSystemCache) GetFileACLsCache ¶ added in v0.4.5
func (cache *FileSystemCache) GetFileACLsCache(path string) []*types.IRODSAccess
GetFileACLsCache retrives a File ACLs cache
func (*FileSystemCache) GetGroupUsersCache ¶ added in v0.3.0
func (cache *FileSystemCache) GetGroupUsersCache(group string) []*types.IRODSUser
GetGroupUsersCache retrives a group user (users in a group) cache
func (*FileSystemCache) GetGroupsCache ¶ added in v0.4.5
func (cache *FileSystemCache) GetGroupsCache() []*types.IRODSUser
GetGroupsCache retrives a groups cache (cache of a list of all groups)
func (*FileSystemCache) GetMetadataCache ¶ added in v0.4.0
func (cache *FileSystemCache) GetMetadataCache(path string) []*types.IRODSMeta
GetMetadataCache retrieves a metadata cache
func (*FileSystemCache) GetUserGroupsCache ¶ added in v0.5.9
func (cache *FileSystemCache) GetUserGroupsCache(user string) []*types.IRODSUser
GetUserGroupsCache retrives a user's groups (groups that a user belongs to) cache
func (*FileSystemCache) GetUsersCache ¶ added in v0.4.5
func (cache *FileSystemCache) GetUsersCache() []*types.IRODSUser
GetUsersCache retrives a users cache (cache of a list of all users)
func (*FileSystemCache) RemoveDirACLsCache ¶ added in v0.4.5
func (cache *FileSystemCache) RemoveDirACLsCache(path string)
RemoveDirACLsCache removes a Dir ACLs cache
func (*FileSystemCache) RemoveDirCache ¶
func (cache *FileSystemCache) RemoveDirCache(path string)
RemoveDirCache removes a dir cache
func (*FileSystemCache) RemoveEntryCache ¶
func (cache *FileSystemCache) RemoveEntryCache(path string)
RemoveEntryCache removes an entry cache
func (*FileSystemCache) RemoveFileACLsCache ¶ added in v0.4.5
func (cache *FileSystemCache) RemoveFileACLsCache(path string)
RemoveFileACLsCache removes a File ACLs cache
func (*FileSystemCache) RemoveGroupUsersCache ¶ added in v0.3.0
func (cache *FileSystemCache) RemoveGroupUsersCache(group string)
RemoveGroupUsersCache removes a group user (users in a group) cache
func (*FileSystemCache) RemoveGroupsCache ¶ added in v0.4.5
func (cache *FileSystemCache) RemoveGroupsCache()
RemoveGroupsCache removes a groups cache (cache of a list of all groups)
func (*FileSystemCache) RemoveMetadataCache ¶ added in v0.4.0
func (cache *FileSystemCache) RemoveMetadataCache(path string)
RemoveMetadataCache removes a metadata cache
func (*FileSystemCache) RemoveUserGroupsCache ¶ added in v0.5.9
func (cache *FileSystemCache) RemoveUserGroupsCache(user string)
RemoveUserGroupsCache removes a user's groups (groups that a user belongs to) cache
func (*FileSystemCache) RemoveUsersCache ¶ added in v0.4.5
func (cache *FileSystemCache) RemoveUsersCache()
RemoveUsersCache removes a users cache (cache of a list of all users)
type FileSystemConfig ¶
type FileSystemConfig struct {
ApplicationName string
ConnectionLifespan time.Duration
OperationTimeout time.Duration
ConnectionIdleTimeout time.Duration
ConnectionMax int
CacheTimeout time.Duration
CacheCleanupTime time.Duration
CacheTimeoutPathMap map[string]time.Duration
// for mysql iCAT backend, this should be true.
// for postgresql iCAT backend, this can be false.
StartNewTransaction bool
}
FileSystemConfig is a struct for file system configuration
func NewFileSystemConfig ¶
func NewFileSystemConfig(applicationName string, connectionLifespan time.Duration, operationTimeout time.Duration, connectionIdleTimeout time.Duration, connectionMax int, cacheTimeout time.Duration, cacheCleanupTime time.Duration, cacheTimeoutPathMap map[string]time.Duration, startNewTransaction bool) *FileSystemConfig
NewFileSystemConfig create a FileSystemConfig
func NewFileSystemConfigWithDefault ¶
func NewFileSystemConfigWithDefault(applicationName string) *FileSystemConfig
NewFileSystemConfigWithDefault create a FileSystemConfig with a default settings