Documentation
¶
Index ¶
- Constants
- func GenerateAccountID(host string, port int, account, zone string) string
- type CacheBackend
- type CacheBackendConfig
- type CacheBackendFactory
- type CacheBackendType
- type CacheConfig
- type CacheItem
- type CacheManager
- type CacheMetrics
- type CacheNamespace
- type ConnectionConfig
- type DirStat
- type Entry
- type EntryReplica
- type EntryType
- type FileHandle
- func (handle *FileHandle) Close() error
- func (handle *FileHandle) GetEntry() *Entry
- func (handle *FileHandle) GetID() string
- func (handle *FileHandle) GetIRODSFileHandle() *types.IRODSFileHandle
- func (handle *FileHandle) GetOffset() int64
- func (handle *FileHandle) GetOpenMode() types.FileOpenMode
- func (handle *FileHandle) IsReadMode() bool
- func (handle *FileHandle) IsReadOnlyMode() bool
- func (handle *FileHandle) IsWriteMode() bool
- func (handle *FileHandle) IsWriteOnlyMode() bool
- func (handle *FileHandle) Lock()
- func (handle *FileHandle) LockDataObject(wait bool) error
- func (handle *FileHandle) RLockDataObject(wait bool) error
- func (handle *FileHandle) Read(buffer []byte) (int, error)
- func (handle *FileHandle) ReadAt(buffer []byte, offset int64) (int, error)
- func (handle *FileHandle) Seek(offset int64, whence int) (int64, error)
- func (handle *FileHandle) ToString() string
- func (handle *FileHandle) Truncate(size int64) error
- func (handle *FileHandle) Unlock()
- func (handle *FileHandle) UnlockDataObject() error
- func (handle *FileHandle) Write(data []byte) (int, error)
- func (handle *FileHandle) WriteAt(data []byte, offset int64) (int, error)
- type FileHandleMap
- func (fileHandleMap *FileHandleMap) Add(handle *FileHandle)
- func (fileHandleMap *FileHandleMap) AddCloseEventHandler(path string, handler FileHandleMapEventHandler) string
- func (fileHandleMap *FileHandleMap) Clear()
- func (fileHandleMap *FileHandleMap) Get(id string) *FileHandle
- func (fileHandleMap *FileHandleMap) List() []*FileHandle
- func (fileHandleMap *FileHandleMap) ListByPath(path string) []*FileHandle
- func (fileHandleMap *FileHandleMap) ListPathsInDir(parentPath string) []string
- func (fileHandleMap *FileHandleMap) Pop(id string) *FileHandle
- func (fileHandleMap *FileHandleMap) PopAll() []*FileHandle
- func (fileHandleMap *FileHandleMap) PopByPath(path string) []*FileHandle
- func (fileHandleMap *FileHandleMap) Remove(id string)
- func (fileHandleMap *FileHandleMap) RemoveCloseEventHandler(handlerID string)
- type FileHandleMapEventHandler
- type FileHandleMapEventHandlerWrap
- type FileLock
- type FileLocks
- func (mgr *FileLocks) Lock(path string)
- func (mgr *FileLocks) LockFilesForPrefix(pathPrefix string) []string
- func (mgr *FileLocks) RLock(path string)
- func (mgr *FileLocks) RUnlock(path string) error
- func (mgr *FileLocks) Unlock(path string) error
- func (mgr *FileLocks) UnlockFiles(paths []string) error
- type FileSystem
- func (fs *FileSystem) AddCacheEventHandler(handler FilesystemCacheEventHandler) string
- func (fs *FileSystem) AddGroupMember(groupName string, username string, zoneName string) error
- func (fs *FileSystem) AddMetadata(irodsPath string, attName string, attValue string, attUnits string) error
- func (fs *FileSystem) AddResourceMetadata(resource string, attName string, attValue string, attUnits string) error
- func (fs *FileSystem) AddTicketAllowedGroup(ticketName string, groupName string) error
- func (fs *FileSystem) AddTicketAllowedHost(ticketName string, host string) error
- func (fs *FileSystem) AddTicketAllowedUser(ticketName string, userName string) error
- func (fs *FileSystem) AddUserMetadata(username string, zoneName string, attName string, attValue string, ...) error
- func (fs *FileSystem) ChangeACLs(path string, access types.IRODSAccessLevelType, userName string, ...) error
- func (fs *FileSystem) ChangeDirACLInheritance(path string, inherit bool, recurse bool, adminFlag bool) error
- func (fs *FileSystem) ChangeUserPassword(username string, zoneName string, newPassword string) error
- func (fs *FileSystem) ChangeUserType(username string, zoneName string, newType types.IRODSUserType) error
- func (fs *FileSystem) ClearCache()
- func (fs *FileSystem) ClearTicketExpirationTime(ticketName string) error
- func (fs *FileSystem) ClearTicketUseLimit(ticketName string) error
- func (fs *FileSystem) ClearTicketWriteByteLimit(ticketName string) error
- func (fs *FileSystem) ClearTicketWriteFileLimit(ticketName string) error
- func (fs *FileSystem) CopyFile(srcPath string, destPath string, force bool) error
- func (fs *FileSystem) CopyFileToFile(srcPath string, destPath string, force bool) error
- func (fs *FileSystem) CreateFile(irodsPath string, resource string, mode string) (*FileHandle, error)
- func (fs *FileSystem) CreateTicket(ticketName string, ticketType types.TicketType, path string) error
- func (fs *FileSystem) CreateUser(username string, zoneName string, userType types.IRODSUserType) (*types.IRODSUser, error)
- func (fs *FileSystem) DeleteMetadata(irodsPath string, avuID int64) error
- func (fs *FileSystem) DeleteMetadataByAVU(irodsPath string, attName string, attValue string, attUnits string) error
- func (fs *FileSystem) DeleteMetadataByName(irodsPath string, attName string) error
- func (fs *FileSystem) DeleteResourceMetadata(resource string, avuID int64) error
- func (fs *FileSystem) DeleteResourceMetadataByAVU(resource string, attName string, attValue string, attUnits string) error
- func (fs *FileSystem) DeleteResourceMetadataByName(resource string, attName string) error
- func (fs *FileSystem) DeleteTicket(ticketName string) error
- func (fs *FileSystem) DeleteUserMetadata(username string, zoneName string, avuID int64) error
- func (fs *FileSystem) DeleteUserMetadataByAVU(username string, zoneName string, attName string, attValue string, ...) error
- func (fs *FileSystem) DeleteUserMetadataByName(username string, zoneName string, attName string) error
- func (fs *FileSystem) DownloadFile(irodsPath string, resource string, localPath string, verifyChecksum bool, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileParallel(irodsPath string, resource string, localPath string, taskNum int, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileParallelResumable(irodsPath string, resource string, localPath string, taskNum int, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileParallelResumableWithConnections(conns []*connection.IRODSConnection, irodsPath string, resource string, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileParallelWithCallback(irodsPath string, resource string, blockSize int, numBlocks int, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileParallelWithCallbackWithConnections(conns []*connection.IRODSConnection, irodsPath string, resource string, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileParallelWithConnections(conns []*connection.IRODSConnection, irodsPath string, resource string, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileRedirectToResource(irodsPath string, resource string, localPath string, taskNum int, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileRedirectToResourceWithConnection(controlConn *connection.IRODSConnection, irodsPath string, resource string, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileResumable(irodsPath string, resource string, localPath string, verifyChecksum bool, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileResumableWithConnection(conn *connection.IRODSConnection, irodsPath string, resource string, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileToBuffer(irodsPath string, resource string, buffer *bytes.Buffer, verifyChecksum bool, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileToBufferWithConnection(conn *connection.IRODSConnection, irodsPath string, resource string, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileWithCallback(irodsPath string, resource string, blockSize int, numBlocks int, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileWithCallbackWithConnection(conn *connection.IRODSConnection, irodsPath string, resource string, ...) (*FileTransferResult, error)
- func (fs *FileSystem) DownloadFileWithConnection(conn *connection.IRODSConnection, irodsPath string, resource string, ...) (*FileTransferResult, error)
- func (fs *FileSystem) Exists(irodsPath string) bool
- func (fs *FileSystem) ExistsDir(irodsPath string) bool
- func (fs *FileSystem) ExistsDirFresh(irodsPath string) bool
- func (fs *FileSystem) ExistsFile(irodsPath string) bool
- func (fs *FileSystem) ExistsFileFresh(irodsPath string) bool
- func (fs *FileSystem) ExistsFresh(irodsPath string) bool
- func (fs *FileSystem) ExtractStructFile(path string, targetCollection string, resource string, dataType types.DataType, ...) error
- func (fs *FileSystem) GetAccount() *types.IRODSAccount
- func (fs *FileSystem) GetConfig() *FileSystemConfig
- func (fs *FileSystem) GetDirACLInheritance(path string) (*types.IRODSAccessInheritance, error)
- func (fs *FileSystem) GetDirStatistics(irodsPath string, recurse bool) (*DirStat, error)
- func (fs *FileSystem) GetHomeDirPath() string
- func (fs *FileSystem) GetID() string
- func (fs *FileSystem) GetIOConnection(allowShared bool) (*connection.IRODSConnection, error)
- func (fs *FileSystem) GetIOSession() *session.IRODSSession
- func (fs *FileSystem) GetLogger() *log.Entry
- func (fs *FileSystem) GetMetadataConnection(allowShared bool) (*connection.IRODSConnection, error)
- func (fs *FileSystem) GetMetadataSession() *session.IRODSSession
- func (fs *FileSystem) GetMetrics() *metrics.IRODSMetrics
- func (fs *FileSystem) GetOpenConnections() int
- func (fs *FileSystem) GetServerVersion() (*types.IRODSVersion, error)
- func (fs *FileSystem) GetTicket(ticketName string) (*types.IRODSTicket, error)
- func (fs *FileSystem) GetTicketForAnonymousAccess(ticketName string) (*types.IRODSTicketForAnonymousAccess, error)
- func (fs *FileSystem) GetTicketRestrictions(ticketID int64) (*IRODSTicketRestrictions, error)
- func (fs *FileSystem) GetUser(username string, zoneName string, userType types.IRODSUserType) (*types.IRODSUser, error)
- func (fs *FileSystem) InvalidateCacheForDirCreate(path string)
- func (fs *FileSystem) InvalidateCacheForDirRemove(path string, recurse bool)
- func (fs *FileSystem) InvalidateCacheForDirUpdate(path string)
- func (fs *FileSystem) InvalidateCacheForFileCreate(path string)
- func (fs *FileSystem) InvalidateCacheForFileRemove(path string)
- func (fs *FileSystem) InvalidateCacheForFileUpdate(path string)
- func (fs *FileSystem) InvalidateCacheForPath(path string)
- func (fs *FileSystem) IsTicketAccess() bool
- func (fs *FileSystem) List(irodsPath string) ([]*Entry, error)
- func (fs *FileSystem) ListACLs(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListACLsForEntries(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListACLsWithGroupUsers(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListAllProcesses() ([]*types.IRODSProcess, error)
- func (fs *FileSystem) ListDirACLs(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListDirACLsWithGroupMembers(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListFileACLs(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListFileACLsWithGroupMembers(path string) ([]*types.IRODSAccess, error)
- func (fs *FileSystem) ListFresh(irodsPath string) ([]*Entry, error)
- func (fs *FileSystem) ListGroupMemberNames(zoneName string, groupName string) ([]string, error)
- func (fs *FileSystem) ListGroupMembers(zoneName string, groupName string) ([]*types.IRODSUser, error)
- func (fs *FileSystem) ListMetadata(irodsPath string) ([]*types.IRODSMeta, error)
- func (fs *FileSystem) ListProcesses(address string, zoneName string) ([]*types.IRODSProcess, error)
- func (fs *FileSystem) ListResourceMetadata(resource string) ([]*types.IRODSMeta, error)
- func (fs *FileSystem) ListTicketHostRestrictions(ticketID int64) ([]string, error)
- func (fs *FileSystem) ListTicketUserGroupRestrictions(ticketID int64) ([]string, error)
- func (fs *FileSystem) ListTicketUserNameRestrictions(ticketID int64) ([]string, error)
- func (fs *FileSystem) ListTickets() ([]*types.IRODSTicket, error)
- func (fs *FileSystem) ListTicketsBasic() ([]*types.IRODSTicket, error)
- func (fs *FileSystem) ListUserGroupNames(zoneName string, username string) ([]string, error)
- func (fs *FileSystem) ListUserGroups(zoneName string, username string) ([]*types.IRODSUser, error)
- func (fs *FileSystem) ListUserMetadata(username string, zoneName string) ([]*types.IRODSMeta, error)
- func (fs *FileSystem) ListUsers(zoneName string, userType types.IRODSUserType) ([]*types.IRODSUser, error)
- func (fs *FileSystem) LockDataObject(irodsPath string, wait bool) (*types.IRODSFileLockHandle, error)
- func (fs *FileSystem) MakeDir(irodsPath string, recurse bool) error
- func (fs *FileSystem) ModifyTicketExpirationTime(ticketName string, expirationTime time.Time) error
- func (fs *FileSystem) ModifyTicketUseLimit(ticketName string, uses int64) error
- func (fs *FileSystem) ModifyTicketWriteByteLimit(ticketName string, bytes int64) error
- func (fs *FileSystem) ModifyTicketWriteFileLimit(ticketName string, count int64) error
- func (fs *FileSystem) OpenFile(irodsPath string, resource string, mode string) (*FileHandle, error)
- func (fs *FileSystem) RLockDataObject(irodsPath string, wait bool) (*types.IRODSFileLockHandle, error)
- func (fs *FileSystem) Release()
- func (fs *FileSystem) RemoveCacheEventHandler(handlerID string)
- func (fs *FileSystem) RemoveDir(irodsPath string, recurse bool, force bool) error
- func (fs *FileSystem) RemoveFile(irodsPath string, force bool) error
- func (fs *FileSystem) RemoveGroupMember(groupName string, username string, zoneName string) error
- func (fs *FileSystem) RemoveTicketAllowedGroup(ticketName string, groupName string) error
- func (fs *FileSystem) RemoveTicketAllowedHost(ticketName string, host string) error
- func (fs *FileSystem) RemoveTicketAllowedUser(ticketName string, userName string) error
- func (fs *FileSystem) RemoveUser(username string, zoneName string, userType types.IRODSUserType) 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(irodsPath string, resource string, update bool) error
- func (fs *FileSystem) ReturnIOConnection(conn *connection.IRODSConnection) error
- func (fs *FileSystem) ReturnMetadataConnection(conn *connection.IRODSConnection) error
- func (fs *FileSystem) SearchByMeta(metaname string, metavalue string) ([]*Entry, error)
- func (fs *FileSystem) SearchDirUnixWildcard(pathUnixWildcard string) ([]*Entry, error)
- func (fs *FileSystem) SearchFileUnixWildcard(pathUnixWildcard string) ([]*Entry, error)
- func (fs *FileSystem) SearchUnixWildcard(pathUnixWildcard string) ([]*Entry, error)
- func (fs *FileSystem) Stat(irodsPath string) (*Entry, error)
- func (fs *FileSystem) StatDir(irodsPath string) (*Entry, error)
- func (fs *FileSystem) StatDirFresh(irodsPath string) (*Entry, error)
- func (fs *FileSystem) StatFile(irodsPath string) (*Entry, error)
- func (fs *FileSystem) StatFileFresh(irodsPath string) (*Entry, error)
- func (fs *FileSystem) StatFresh(irodsPath string) (*Entry, error)
- func (fs *FileSystem) StatProcess(address string, zoneName string) ([]*types.IRODSProcess, error)
- func (fs *FileSystem) SupportParallelUpload() bool
- func (fs *FileSystem) Touch(irodsPath string, resource string, noCreate bool, replicaNumber *int, ...) error
- func (fs *FileSystem) TruncateFile(irodsPath string, size int64) error
- func (fs *FileSystem) UnlockDataObject(lockHandle *types.IRODSFileLockHandle) error
- func (fs *FileSystem) UploadFile(localPath string, irodsPath string, resource string, replicate bool, ...) (*FileTransferResult, error)
- func (fs *FileSystem) UploadFileFromBuffer(buffer *bytes.Buffer, irodsPath string, resource string, replicate bool, ...) (*FileTransferResult, error)
- func (fs *FileSystem) UploadFileFromBufferWithConnection(conn *connection.IRODSConnection, buffer *bytes.Buffer, irodsPath string, ...) (*FileTransferResult, error)
- func (fs *FileSystem) UploadFileParallel(localPath string, irodsPath string, resource string, taskNum int, ...) (*FileTransferResult, error)
- func (fs *FileSystem) UploadFileParallelWithConnections(conns []*connection.IRODSConnection, localPath string, irodsPath string, ...) (*FileTransferResult, error)
- func (fs *FileSystem) UploadFileRedirectToResource(localPath string, irodsPath string, resource string, taskNum int, ...) (*FileTransferResult, error)
- func (fs *FileSystem) UploadFileRedirectToResourceWithConnection(controlConn *connection.IRODSConnection, localPath string, irodsPath string, ...) (*FileTransferResult, error)
- func (fs *FileSystem) UploadFileWithConnection(conn *connection.IRODSConnection, localPath string, irodsPath string, ...) (*FileTransferResult, error)
- type FileSystemCache
- func (cache *FileSystemCache) AddAclCache(path string, accesses []*types.IRODSAccess)
- func (cache *FileSystemCache) AddAclCacheMulti(accesses []*types.IRODSAccess)
- func (cache *FileSystemCache) AddDirCache(path string, entries []string)
- func (cache *FileSystemCache) AddEntryCache(entry *Entry)
- func (cache *FileSystemCache) AddGroupMemberCache(groupName string, zoneName string, usernames []string)
- func (cache *FileSystemCache) AddMetadataCache(path string, metas []*types.IRODSMeta)
- func (cache *FileSystemCache) AddNegativeEntryCache(path string)
- func (cache *FileSystemCache) AddUserCache(user *types.IRODSUser)
- func (cache *FileSystemCache) AddUserCacheMulti(users []*types.IRODSUser)
- func (cache *FileSystemCache) AddUserGroupCache(zoneName string, username string, groupNames []string)
- func (cache *FileSystemCache) AddUserListCache(zoneName string, userType types.IRODSUserType, usernames []string)
- func (cache *FileSystemCache) ClearAclCache()
- func (cache *FileSystemCache) ClearAllGroupMembersCache()
- func (cache *FileSystemCache) ClearAllUserCache()
- func (cache *FileSystemCache) ClearAllUserListCache()
- func (cache *FileSystemCache) ClearDirCache()
- func (cache *FileSystemCache) ClearEntryCache()
- func (cache *FileSystemCache) ClearGroupMembersCacheForZone(zoneName string)
- func (cache *FileSystemCache) ClearMetadataCache()
- func (cache *FileSystemCache) ClearNegativeEntryCache()
- func (cache *FileSystemCache) ClearUserCacheForZone(zoneName string)
- func (cache *FileSystemCache) ClearUserGroupCacheForZone(zoneName string)
- func (cache *FileSystemCache) ClearUserListCacheForZone(zoneName string)
- func (cache *FileSystemCache) Close()
- func (cache *FileSystemCache) GetAclCache(path string) []*types.IRODSAccess
- func (cache *FileSystemCache) GetDirCache(path string) []string
- func (cache *FileSystemCache) GetEntryCache(path string) *Entry
- func (cache *FileSystemCache) GetGroupMemberCache(groupName string, zoneName string) []string
- func (cache *FileSystemCache) GetMetadataCache(path string) []*types.IRODSMeta
- func (cache *FileSystemCache) GetUserCache(username string, zoneName string) *types.IRODSUser
- func (cache *FileSystemCache) GetUserGroupCache(zoneName string, username string) []string
- func (cache *FileSystemCache) GetUserListCache(zoneName string, userType types.IRODSUserType) []string
- func (cache *FileSystemCache) HasNegativeEntryCache(path string) bool
- func (cache *FileSystemCache) RemoveAclCache(path string)
- func (cache *FileSystemCache) RemoveAllNegativeEntryCacheForPath(path string)
- func (cache *FileSystemCache) RemoveDirCache(path string)
- func (cache *FileSystemCache) RemoveDirEntryCache(path string, recurse bool)
- func (cache *FileSystemCache) RemoveEntryCache(path string)
- func (cache *FileSystemCache) RemoveGroupMemberCache(groupName string, zoneName string)
- func (cache *FileSystemCache) RemoveMetadataCache(path string)
- func (cache *FileSystemCache) RemoveNegativeEntryCache(path string)
- func (cache *FileSystemCache) RemoveParentDirEntryCache(path string, recurse bool)
- func (cache *FileSystemCache) RemoveUserCache(username string, zoneName string)
- func (cache *FileSystemCache) RemoveUserGroupCache(zoneName string, username string)
- func (cache *FileSystemCache) RemoveUserListCache(zoneName string, userType types.IRODSUserType)
- type FileSystemConfig
- type FileTransferResult
- type FilesystemCacheEventHandler
- type FilesystemCacheEventHandlerMap
- func (handlerMap *FilesystemCacheEventHandlerMap) AddEventHandler(handler FilesystemCacheEventHandler) string
- func (handlerMap *FilesystemCacheEventHandlerMap) GetEventHandler(handlerID string) FilesystemCacheEventHandler
- func (handlerMap *FilesystemCacheEventHandlerMap) GetEventHandlerIDs() []string
- func (handlerMap *FilesystemCacheEventHandlerMap) GetEventHandlers() []FilesystemCacheEventHandler
- func (handlerMap *FilesystemCacheEventHandlerMap) Release()
- func (handlerMap *FilesystemCacheEventHandlerMap) RemoveEventHandler(handlerID string)
- func (handlerMap *FilesystemCacheEventHandlerMap) SendDirCreateEvent(path string)
- func (handlerMap *FilesystemCacheEventHandlerMap) SendDirExtractEvent(path string)
- func (handlerMap *FilesystemCacheEventHandlerMap) SendDirRemoveEvent(path string)
- func (handlerMap *FilesystemCacheEventHandlerMap) SendEvent(path string, eventType FilesystemCacheEventType)
- func (handlerMap *FilesystemCacheEventHandlerMap) SendFileCreateEvent(path string)
- func (handlerMap *FilesystemCacheEventHandlerMap) SendFileRemoveEvent(path string)
- func (handlerMap *FilesystemCacheEventHandlerMap) SendFileUpdateEvent(path string)
- type FilesystemCacheEventType
- type IRODSTicketRestrictions
- type MemoryBackendConfig
- type MemoryCacheBackend
- type MemoryNamespace
- func (mn *MemoryNamespace) Clear() error
- func (mn *MemoryNamespace) Delete(key string) error
- func (mn *MemoryNamespace) DeletePrefix(prefix string) error
- func (mn *MemoryNamespace) Exists(key string) (bool, error)
- func (mn *MemoryNamespace) Get(key string) (interface{}, bool, error)
- func (mn *MemoryNamespace) GetPrefix(prefix string) (map[string]interface{}, error)
- func (mn *MemoryNamespace) Set(key string, value interface{}, ttl time.Duration) error
- type MetadataCacheTimeoutSetting
- type NoCacheBackend
- type NoCacheNamespace
- func (n *NoCacheNamespace) Clear() error
- func (n *NoCacheNamespace) Delete(key string) error
- func (n *NoCacheNamespace) DeletePrefix(prefix string) error
- func (n *NoCacheNamespace) Exists(key string) (bool, error)
- func (n *NoCacheNamespace) Get(key string) (interface{}, bool, error)
- func (n *NoCacheNamespace) GetPrefix(prefix string) (map[string]interface{}, error)
- func (n *NoCacheNamespace) Set(key string, value interface{}, ttl time.Duration) error
- type RedisBackendConfig
- type RedisCacheBackend
- type RedisNamespace
- func (rn *RedisNamespace) Clear() error
- func (rn *RedisNamespace) Delete(key string) error
- func (rn *RedisNamespace) DeletePrefix(prefix string) error
- func (rn *RedisNamespace) Exists(key string) (bool, error)
- func (rn *RedisNamespace) Get(key string) (interface{}, bool, error)
- func (rn *RedisNamespace) GetPrefix(prefix string) (map[string]interface{}, error)
- func (rn *RedisNamespace) Set(key string, value interface{}, ttl time.Duration) error
- type RistrettoBackendConfig
- type RistrettoCacheBackend
- type RistrettoNamespace
- func (rn *RistrettoNamespace) Clear() error
- func (rn *RistrettoNamespace) Delete(key string) error
- func (rn *RistrettoNamespace) DeletePrefix(prefix string) error
- func (rn *RistrettoNamespace) Exists(key string) (bool, error)
- func (rn *RistrettoNamespace) Get(key string) (interface{}, bool, error)
- func (rn *RistrettoNamespace) GetPrefix(prefix string) (map[string]interface{}, error)
- func (rn *RistrettoNamespace) Set(key string, value interface{}, ttl time.Duration) error
Constants ¶
const ( // FileSystemApplicationNameDefault is a default value of application name FileSystemApplicationNameDefault string = session.IRODSSessionApplicationNameDefault // Connection Config // FileSystemConnectionCreationTimeoutDefault is a default timeout value of connection error FileSystemConnectionCreationTimeoutDefault time.Duration = session.IRODSSessionConnectionCreationTimeoutDefault // FileSystemTcpBufferSizeDefault is a default value of tcp buffer size FileSystemTcpBufferSizeDefault int = session.IRODSSessionTcpBufferSizeDefault // FileSystemConnectionLifespanDefault is a default lifespan of a connection FileSystemConnectionLifespanDefault time.Duration = session.IRODSSessionConnectionLifespanDefault // FileSystemConnectionIdleTimeoutDefault is a default value of connection idle timeout FileSystemConnectionIdleTimeoutDefault time.Duration = session.IRODSSessionConnectionIdleTimeoutDefault // FileSystemOperationTimeout is a default value of operation timeout FileSystemOperationTimeout time.Duration = session.IRODSSessionOperationTimeoutDefault // FileSystemLongOperationTimeout is a default value of long operation timeout FileSystemLongOperationTimeout time.Duration = session.IRODSSessionLongOperationTimeoutDefault // Cache // For go-cache (memory) // FileSystemCacheTimeout is a default value of cache timeout FileSystemCacheTimeout time.Duration = 1 * time.Minute FileSystemCacheCleanupInterval time.Duration = 5 * time.Minute // For Ristretto // FileSystemCacheMaxEntries is a default value of max cache entries FileSystemCacheMaxEntries int64 = 1000000 // FileSystemCacheMaxCost is a default value of max cache cost FileSystemCacheMaxCost int64 = 10 * 1024 * 1024 // FileSystemCacheBufferItems is a default value of cache buffer items FileSystemCacheBufferItems int64 = 128 // FileSystemCacheCostPerEntryKB is a default value of cost per KB of entry FileSystemCacheCostPerEntryKB int64 = 1 // For Redis // FileSystemCachePoolSize is a default value of cache pool size FileSystemCachePoolSize int = 10 // FileSystemCacheConnectTimeout is a default value of cache connect timeout FileSystemCacheConnectTimeout time.Duration = 5 * time.Second // FileSystemCacheCommandTimeout is a default value of cache command timeout FileSystemCacheCommandTimeout time.Duration = 3 * time.Second // Metadata Connection // FileSystemMetadataConnectionInitNumberDefault is a default value of connection init number FileSystemMetadataConnectionInitNumberDefault int = 1 // FileSystemMetadataConnectionMaxNumberDefault is a default number of connection max value FileSystemMetadataConnectionMaxNumberDefault int = 2 // FileSystemMetadataConnectionMaxIdleNumberDefault is a default number of max idle connections FileSystemMetadataConnectionMaxIdleNumberDefault int = 2 // IO Connection // FileSystemIOConnectionInitNumberDefault is a default value of connection init number FileSystemIOConnectionInitNumberDefault int = 0 // FileSystemIOConnectionMaxNumberDefault is a default number of connection max value FileSystemIOConnectionMaxNumberDefault int = 8 // FileSystemIOConnectionMaxIdleNumberDefault is a default number of max idle connections FileSystemIOConnectionMaxIdleNumberDefault int = 5 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheBackend ¶ added in v0.21.0
type CacheBackend interface {
// GetNamespace returns a namespace interface for isolated storage
// The namespace parameter should be pre-computed by the caller as: accountID + ":" + logicalNamespace
// where accountID is a hash of (host, account, zone)
// Examples:
// - "hash(host|account|zone):entries"
// - "hash(host|account|zone):metadata"
GetNamespace(namespace string) (CacheNamespace, error)
// DeleteNamespace removes all entries in a namespace
DeleteNamespace(namespace string) error
// Clear removes all entries from the entire cache
Clear() error
// Close closes the backend connection (useful for Redis)
Close() error
}
CacheBackend defines the interface for cache implementations Namespace support is built-in for all backends
IMPORTANT: Multi-account safety Since multiple FileSystem instances can exist with different accounts, cache namespace IDs must be derived from host, account, and zone to prevent cross-account data leaks. The namespace prefix (e.g., "entries", "metadata") is controlled by the caller.
type CacheBackendConfig ¶ added in v0.21.0
type CacheBackendConfig struct {
// Backend type (memory, ristretto, redis)
Type CacheBackendType `yaml:"type,omitempty" json:"type,omitempty"`
// Memory backend configuration
Memory *MemoryBackendConfig `yaml:"memory,omitempty" json:"memory,omitempty"`
// Ristretto backend configuration
Ristretto *RistrettoBackendConfig `yaml:"ristretto,omitempty" json:"ristretto,omitempty"`
// Redis backend configuration
Redis *RedisBackendConfig `yaml:"redis,omitempty" json:"redis,omitempty"`
}
CacheBackendConfig holds configuration for all backend types
func NewDefaultCacheBackendConfig ¶ added in v0.21.0
func NewDefaultCacheBackendConfig() *CacheBackendConfig
NewDefaultCacheBackendConfig creates a default cache backend configuration Note: Backend-specific defaults are defined in their respective files
func (*CacheBackendConfig) Validate ¶ added in v0.21.0
func (c *CacheBackendConfig) Validate() error
Validate checks if the configuration is valid
type CacheBackendFactory ¶ added in v0.21.0
type CacheBackendFactory struct {
// contains filtered or unexported fields
}
CacheBackendFactory creates cache backend instances based on configuration
func NewCacheBackendFactory ¶ added in v0.21.0
func NewCacheBackendFactory(config *CacheBackendConfig) *CacheBackendFactory
NewCacheBackendFactory creates a new cache backend factory
func (*CacheBackendFactory) CreateBackend ¶ added in v0.21.0
func (f *CacheBackendFactory) CreateBackend() (CacheBackend, error)
CreateBackend creates a cache backend instance based on the configured type
type CacheBackendType ¶ added in v0.21.0
type CacheBackendType string
CacheBackendType defines supported cache backend types
const ( // CacheBackendTypeMemory uses in-memory go-cache backend CacheBackendTypeMemory CacheBackendType = "memory" // CacheBackendTypeRistretto uses ristretto backend CacheBackendTypeRistretto CacheBackendType = "ristretto" // CacheBackendTypeRedis uses external redis server backend CacheBackendTypeRedis CacheBackendType = "redis" // CacheBackendTypeNone disables caching CacheBackendTypeNone CacheBackendType = "none" )
type CacheConfig ¶ added in v0.15.0
type CacheConfig struct {
MetadataTimeoutSettings []MetadataCacheTimeoutSetting `yaml:"metadata_timeout_settings,omitempty" json:"metadata_timeout_settings,omitempty"`
// for mysql iCAT backend, this should be true.
// for postgresql iCAT backend, this can be false.
StartNewTransaction bool `yaml:"start_new_transaction,omitempty" json:"start_new_transaction,omitempty"`
// Backend configuration for caching (memory, ristretto, redis, none)
Backend *CacheBackendConfig `yaml:"backend,omitempty" json:"backend,omitempty"`
Logger *log.Logger // can be nil
LogEntry *log.Entry // can be nil
}
CacheConfig defines cache config
func NewDefaultCacheConfig ¶ added in v0.15.0
func NewDefaultCacheConfig() CacheConfig
NewDefaultCacheConfig creates a new default CacheConfig
type CacheManager ¶ added in v0.21.0
type CacheManager struct {
// contains filtered or unexported fields
}
CacheManager manages shared caches for FileSystem instances Instances with the same accountID share the same cache
func GetCacheManager ¶ added in v0.21.0
func GetCacheManager() *CacheManager
GetCacheManager returns the singleton CacheManager instance
func (*CacheManager) AcquireCache ¶ added in v0.21.0
func (cm *CacheManager) AcquireCache(config *CacheConfig, accountID string) *FileSystemCache
AcquireCache gets or creates a cache for the given accountID
func (*CacheManager) Clear ¶ added in v0.21.0
func (cm *CacheManager) Clear()
Clear clears all caches (useful for testing)
func (*CacheManager) GetStats ¶ added in v0.21.0
func (cm *CacheManager) GetStats() map[string]int
GetStats returns cache statistics for debugging
func (*CacheManager) ReleaseCache ¶ added in v0.21.0
func (cm *CacheManager) ReleaseCache(accountID string)
ReleaseCache decrements the reference count and removes the cache if it reaches 0
type CacheMetrics ¶ added in v0.21.0
type CacheMetrics struct {
Hits int64
Misses int64
Sets int64
Deletes int64
// contains filtered or unexported fields
}
CacheMetrics collects cache statistics
func (*CacheMetrics) GetHitRate ¶ added in v0.21.0
func (cm *CacheMetrics) GetHitRate() float64
GetHitRate returns the hit rate as a percentage
func (*CacheMetrics) IncrementDeletes ¶ added in v0.21.0
func (cm *CacheMetrics) IncrementDeletes()
IncrementDeletes increments delete counter
func (*CacheMetrics) IncrementHits ¶ added in v0.21.0
func (cm *CacheMetrics) IncrementHits()
IncrementHits increments hit counter
func (*CacheMetrics) IncrementMisses ¶ added in v0.21.0
func (cm *CacheMetrics) IncrementMisses()
IncrementMisses increments miss counter
func (*CacheMetrics) IncrementSets ¶ added in v0.21.0
func (cm *CacheMetrics) IncrementSets()
IncrementSets increments set counter
func (*CacheMetrics) String ¶ added in v0.21.0
func (cm *CacheMetrics) String() string
String returns a string representation of the metrics
type CacheNamespace ¶ added in v0.21.0
type CacheNamespace interface {
// Get retrieves a namespaced value
// Returns (value, found, error)
Get(key string) (interface{}, bool, error)
// Set stores a namespaced value with optional TTL
// ttl == 0 means use the backend's default TTL
// ttl < 0 means no caching
Set(key string, value interface{}, ttl time.Duration) error
// Delete removes a namespaced key
Delete(key string) error
// Exists checks if a namespaced key exists
Exists(key string) (bool, error)
// DeletePrefix removes all keys with a given prefix within this namespace
DeletePrefix(prefix string) error
// GetPrefix retrieves all keys and values with a given prefix within this namespace
GetPrefix(prefix string) (map[string]interface{}, error)
// Clear removes all entries in this namespace
Clear() error
}
CacheNamespace provides isolated cache storage Useful when different components need separate cache spaces
type ConnectionConfig ¶ added in v0.15.0
type ConnectionConfig struct {
CreationTimeout types.Duration `yaml:"creation_timeout,omitempty" json:"creation_timeout,omitempty"` // timeout for creating a new connection
InitNumber int `yaml:"init_number,omitempty" json:"init_number,omitempty"` // number of connections created when init
MaxNumber int `yaml:"max_number,omitempty" json:"max_number,omitempty"` // max number of connections
MaxIdleNumber int `yaml:"max_idle_number,omitempty" json:"max_idle_number,omitempty"` // max number of idle connections
Lifespan types.Duration `yaml:"lifespan,omitempty" json:"lifespan,omitempty"` // connection's lifespan (max time to be reused)
IdleTimeout types.Duration `yaml:"idle_timeout,omitempty" json:"idle_timeout,omitempty"` // time out for being idle, after this point the connection will be disposed
OperationTimeout types.Duration `yaml:"operation_timeout,omitempty" json:"operation_timeout,omitempty"` // timeout for iRODS operations
LongOperationTimeout types.Duration `yaml:"long_operation_timeout,omitempty" json:"long_operation_timeout,omitempty"` // timeout for long iRODS operations
TcpBufferSize int `yaml:"tcp_buffer_size,omitempty" json:"tcp_buffer_size,omitempty"` // buffer size
WaitConnection bool `yaml:"wait_connection,omitempty" json:"wait_connection,omitempty"` // whether to wait for a connection to be available
}
ConnectionConfig is a struct that stores configuration for connections
func NewDefaultIOConnectionConfig ¶ added in v0.15.0
func NewDefaultIOConnectionConfig() ConnectionConfig
NewDefaultIOConnectionConfig creates a default ConnectionConfig for IO
func NewDefaultMetadataConnectionConfig ¶ added in v0.15.0
func NewDefaultMetadataConnectionConfig() ConnectionConfig
NewDefaultMetadataConnectionConfig creates a default ConnectionConfig for metadata
type DirStat ¶ added in v0.20.0
type DirStat struct {
Path string `json:"path"`
TotalSize int64 `json:"total_size"`
FileCount int64 `json:"file_count"`
Recursive bool `json:"recursive"`
}
DirStat is a struct for directory statistics
func NewDirStat ¶ added in v0.20.0
func NewDirStat(path string, recursive bool, stat *types.IRODSCollectionStat) *DirStat
type Entry ¶ added in v0.5.2
type Entry struct {
ID int64 `json:"id"`
Type EntryType `json:"type"`
Name string `json:"name"`
Path string `json:"path"`
Owner string `json:"owner"`
Size int64 `json:"size"`
DataType string `json:"data_type"`
CreateTime time.Time `json:"create_time"`
ModifyTime time.Time `json:"modify_time"`
AccessTime time.Time `json:"access_time"`
CheckSumAlgorithm types.ChecksumAlgorithm `json:"checksum_algorithm"`
CheckSum []byte `json:"checksum"`
IRODSReplicas []types.IRODSReplica `json:"replicas,omitempty"`
CacheID string `json:"cache_id,omitempty"`
}
Entry is a struct for filesystem entry
func NewEntryFromCollection ¶ added in v0.18.0
func NewEntryFromCollection(collection *types.IRODSCollection) *Entry
func NewEntryFromDataObject ¶ added in v0.18.0
func NewEntryFromDataObject(dataobject *types.IRODSDataObject) *Entry
func (*Entry) ToCollection ¶ added in v0.18.0
func (entry *Entry) ToCollection() *types.IRODSCollection
ToCollection returns collection
func (*Entry) ToDataObject ¶ added in v0.18.0
func (entry *Entry) ToDataObject() *types.IRODSDataObject
ToDataObject returns data object
type EntryReplica ¶ added in v0.18.0
type EntryReplica struct {
}
type FileHandle ¶
type FileHandle struct {
// contains filtered or unexported fields
}
FileHandle is a handle for a file opened
func (*FileHandle) GetEntry ¶ added in v0.7.5
func (handle *FileHandle) GetEntry() *Entry
GetEntry returns Entry info
func (*FileHandle) GetID ¶ added in v0.7.5
func (handle *FileHandle) GetID() string
GetID returns ID
func (*FileHandle) GetIRODSFileHandle ¶ added in v0.7.5
func (handle *FileHandle) GetIRODSFileHandle() *types.IRODSFileHandle
GetIRODSFileHandle returns iRODS File Handle
func (*FileHandle) GetOffset ¶
func (handle *FileHandle) GetOffset() int64
GetOffset returns current offset
func (*FileHandle) GetOpenMode ¶ added in v0.7.5
func (handle *FileHandle) GetOpenMode() types.FileOpenMode
GetOpenMode returns file open mode
func (*FileHandle) IsReadMode ¶
func (handle *FileHandle) IsReadMode() bool
IsReadMode returns true if file is opened with read mode
func (*FileHandle) IsReadOnlyMode ¶ added in v0.7.6
func (handle *FileHandle) IsReadOnlyMode() bool
IsReadOnlyMode returns true if file is opened with read only mode
func (*FileHandle) IsWriteMode ¶
func (handle *FileHandle) IsWriteMode() bool
IsWriteMode returns true if file is opened with write mode
func (*FileHandle) IsWriteOnlyMode ¶ added in v0.7.6
func (handle *FileHandle) IsWriteOnlyMode() bool
IsWriteOnlyMode returns true if file is opened with write only mode
func (*FileHandle) LockDataObject ¶ added in v0.12.8
func (handle *FileHandle) LockDataObject(wait bool) error
LockDataObject locks data object with write lock (exclusive)
func (*FileHandle) RLockDataObject ¶ added in v0.12.8
func (handle *FileHandle) RLockDataObject(wait bool) error
RLockDataObject locks data object with read lock
func (*FileHandle) Read ¶
func (handle *FileHandle) Read(buffer []byte) (int, error)
Read reads the file, implements io.Reader.Read
func (*FileHandle) ReadAt ¶ added in v0.5.5
func (handle *FileHandle) ReadAt(buffer []byte, offset int64) (int, error)
ReadAt reads data from given offset
func (*FileHandle) Seek ¶
func (handle *FileHandle) Seek(offset int64, whence int) (int64, error)
Seek moves file pointer
func (*FileHandle) ToString ¶
func (handle *FileHandle) ToString() string
ToString stringifies the object
func (*FileHandle) Truncate ¶ added in v0.7.0
func (handle *FileHandle) Truncate(size int64) error
Truncate truncates the file
func (*FileHandle) Unlock ¶ added in v0.7.5
func (handle *FileHandle) Unlock()
Unlock unlocks the handle
func (*FileHandle) UnlockDataObject ¶ added in v0.12.8
func (handle *FileHandle) UnlockDataObject() error
UnlockDataObject unlocks data object
type FileHandleMap ¶ added in v0.7.5
type FileHandleMap struct {
// contains filtered or unexported fields
}
FileHandleMap manages File Handles opened
func NewFileHandleMap ¶ added in v0.7.5
func NewFileHandleMap() *FileHandleMap
NewFileHandleMap creates a new FileHandleMap
func (*FileHandleMap) Add ¶ added in v0.7.5
func (fileHandleMap *FileHandleMap) Add(handle *FileHandle)
Add registers a file handle
func (*FileHandleMap) AddCloseEventHandler ¶ added in v0.9.3
func (fileHandleMap *FileHandleMap) AddCloseEventHandler(path string, handler FileHandleMapEventHandler) string
AddCloseEventHandler registers an event handler for file close
func (*FileHandleMap) Clear ¶ added in v0.7.5
func (fileHandleMap *FileHandleMap) Clear()
Clear clears all file handles registered
func (*FileHandleMap) Get ¶ added in v0.7.5
func (fileHandleMap *FileHandleMap) Get(id string) *FileHandle
Get returns a file handle registered using ID
func (*FileHandleMap) List ¶ added in v0.7.5
func (fileHandleMap *FileHandleMap) List() []*FileHandle
List lists all file handles registered
func (*FileHandleMap) ListByPath ¶ added in v0.7.5
func (fileHandleMap *FileHandleMap) ListByPath(path string) []*FileHandle
ListByPath returns file handles registered using path
func (*FileHandleMap) ListPathsInDir ¶ added in v0.7.5
func (fileHandleMap *FileHandleMap) ListPathsInDir(parentPath string) []string
ListPathsInDir returns paths of file handles under given parent path
func (*FileHandleMap) Pop ¶ added in v0.7.5
func (fileHandleMap *FileHandleMap) Pop(id string) *FileHandle
Pop pops a file handle registered using ID and returns the handle
func (*FileHandleMap) PopAll ¶ added in v0.7.5
func (fileHandleMap *FileHandleMap) PopAll() []*FileHandle
PopAll pops all file handles registered (clear) and returns
func (*FileHandleMap) PopByPath ¶ added in v0.7.5
func (fileHandleMap *FileHandleMap) PopByPath(path string) []*FileHandle
PopByPath pops file handles registered using path and returns the handles
func (*FileHandleMap) Remove ¶ added in v0.7.5
func (fileHandleMap *FileHandleMap) Remove(id string)
Remove deletes a file handle registered using ID
func (*FileHandleMap) RemoveCloseEventHandler ¶ added in v0.9.3
func (fileHandleMap *FileHandleMap) RemoveCloseEventHandler(handlerID string)
RemoveCloseEventHandler deregisters an event handler for file close
type FileHandleMapEventHandler ¶ added in v0.9.3
FileHandleMapEventHandler is a event handler for FileHandleMap
type FileHandleMapEventHandlerWrap ¶ added in v0.9.3
type FileHandleMapEventHandlerWrap struct {
// contains filtered or unexported fields
}
FileHandleMapEventHandlerWrap is wrapper event handler
type FileLock ¶ added in v0.7.0
type FileLock struct {
// contains filtered or unexported fields
}
FileLock is a lock for a file
type FileLocks ¶ added in v0.7.0
type FileLocks struct {
// contains filtered or unexported fields
}
FileLocks manages file locks
func NewFileLocks ¶ added in v0.7.0
func NewFileLocks() *FileLocks
NewFileLocks creates a new FileLocks
func (*FileLocks) LockFilesForPrefix ¶ added in v0.7.0
LockFilesForPrefix locks all files starting with the given prefix, does not create a new lock, but increases reference
func (*FileLocks) UnlockFiles ¶ added in v0.7.0
UnlockFiles unlocks multiple files
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 (*FileSystem) AddCacheEventHandler ¶ added in v0.10.6
func (fs *FileSystem) AddCacheEventHandler(handler FilesystemCacheEventHandler) string
AddCacheEventHandler adds cache event handler
func (*FileSystem) AddGroupMember ¶ added in v0.16.0
func (fs *FileSystem) AddGroupMember(groupName string, username string, zoneName string) error
AddGroupMember adds a user to a group
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) AddResourceMetadata ¶ added in v0.14.4
func (fs *FileSystem) AddResourceMetadata(resource string, attName string, attValue string, attUnits string) error
AddResourceMetadata adds a resource metadata
func (*FileSystem) AddTicketAllowedGroup ¶ added in v0.12.0
func (fs *FileSystem) AddTicketAllowedGroup(ticketName string, groupName string) error
AddTicketAllowedGroup adds a group to the allowed group names list of the given ticket
func (*FileSystem) AddTicketAllowedHost ¶ added in v0.12.0
func (fs *FileSystem) AddTicketAllowedHost(ticketName string, host string) error
AddTicketAllowedHost adds a host to the allowed hosts list of the given ticket
func (*FileSystem) AddTicketAllowedUser ¶ added in v0.12.0
func (fs *FileSystem) AddTicketAllowedUser(ticketName string, userName string) error
AddTicketAllowedUser adds a user to the allowed user names list of the given ticket
func (*FileSystem) AddUserMetadata ¶ added in v0.4.5
func (fs *FileSystem) AddUserMetadata(username string, zoneName string, attName string, attValue string, attUnits string) error
AddUserMetadata adds a user metadata
func (*FileSystem) ChangeACLs ¶ added in v0.18.0
func (fs *FileSystem) ChangeACLs(path string, access types.IRODSAccessLevelType, userName string, zoneName string, recurse bool, adminFlag bool) error
ChangeACLs changes ACLs of a file or directory
func (*FileSystem) ChangeDirACLInheritance ¶ added in v0.18.0
func (fs *FileSystem) ChangeDirACLInheritance(path string, inherit bool, recurse bool, adminFlag bool) error
ChangeDirACLInheritance changes ACL inheritance of a directory
func (*FileSystem) ChangeUserPassword ¶ added in v0.16.0
func (fs *FileSystem) ChangeUserPassword(username string, zoneName string, newPassword string) error
ChangeUserPassword changes a user's password
func (*FileSystem) ChangeUserType ¶ added in v0.16.0
func (fs *FileSystem) ChangeUserType(username string, zoneName string, newType types.IRODSUserType) error
ChangeUserType changes a user's type
func (*FileSystem) ClearCache ¶
func (fs *FileSystem) ClearCache()
ClearCache clears all file system caches
func (*FileSystem) ClearTicketExpirationTime ¶ added in v0.12.0
func (fs *FileSystem) ClearTicketExpirationTime(ticketName string) error
ClearTicketExpirationTime clears the expiration time of the given ticket
func (*FileSystem) ClearTicketUseLimit ¶ added in v0.12.0
func (fs *FileSystem) ClearTicketUseLimit(ticketName string) error
ClearTicketUseLimit clears the use limit of the given ticket
func (*FileSystem) ClearTicketWriteByteLimit ¶ added in v0.12.0
func (fs *FileSystem) ClearTicketWriteByteLimit(ticketName string) error
ClearTicketWriteByteLimit clears the write byte limit of the given ticket
func (*FileSystem) ClearTicketWriteFileLimit ¶ added in v0.12.0
func (fs *FileSystem) ClearTicketWriteFileLimit(ticketName string) error
ClearTicketWriteFileLimit clears the write file limit of the given ticket
func (*FileSystem) CopyFile ¶
func (fs *FileSystem) CopyFile(srcPath string, destPath string, force bool) error
CopyFile copies a file
func (*FileSystem) CopyFileToFile ¶
func (fs *FileSystem) CopyFileToFile(srcPath string, destPath string, force bool) error
CopyFileToFile copies a file
func (*FileSystem) CreateFile ¶
func (fs *FileSystem) CreateFile(irodsPath string, resource string, mode string) (*FileHandle, error)
CreateFile opens a new file for write
func (*FileSystem) CreateTicket ¶ added in v0.12.0
func (fs *FileSystem) CreateTicket(ticketName string, ticketType types.TicketType, path string) error
CreateTicket creates a new ticket
func (*FileSystem) CreateUser ¶ added in v0.16.0
func (fs *FileSystem) CreateUser(username string, zoneName string, userType types.IRODSUserType) (*types.IRODSUser, error)
CreateUser creates a new user
func (*FileSystem) DeleteMetadata ¶ added in v0.4.0
func (fs *FileSystem) DeleteMetadata(irodsPath string, avuID int64) error
DeleteMetadata deletes a metadata for the path
func (*FileSystem) DeleteMetadataByAVU ¶ added in v0.18.0
func (fs *FileSystem) DeleteMetadataByAVU(irodsPath string, attName string, attValue string, attUnits string) error
DeleteMetadataByAVU deletes a metadata for the path by AVU
func (*FileSystem) DeleteMetadataByName ¶ added in v0.14.4
func (fs *FileSystem) DeleteMetadataByName(irodsPath string, attName string) error
DeleteMetadataByName deletes a metadata for the path by name
func (*FileSystem) DeleteResourceMetadata ¶ added in v0.14.4
func (fs *FileSystem) DeleteResourceMetadata(resource string, avuID int64) error
DeleteResourceMetadata deletes a resource metadata
func (*FileSystem) DeleteResourceMetadataByAVU ¶ added in v0.18.0
func (fs *FileSystem) DeleteResourceMetadataByAVU(resource string, attName string, attValue string, attUnits string) error
DeleteResourceMetadataByAVU deletes a resource metadata by AVU
func (*FileSystem) DeleteResourceMetadataByName ¶ added in v0.14.4
func (fs *FileSystem) DeleteResourceMetadataByName(resource string, attName string) error
DeleteResourceMetadataByName deletes a resource metadata by name
func (*FileSystem) DeleteTicket ¶ added in v0.12.0
func (fs *FileSystem) DeleteTicket(ticketName string) error
DeleteTicket deletes the given ticket
func (*FileSystem) DeleteUserMetadata ¶ added in v0.4.5
func (fs *FileSystem) DeleteUserMetadata(username string, zoneName string, avuID int64) error
DeleteUserMetadata deletes a user metadata
func (*FileSystem) DeleteUserMetadataByAVU ¶ added in v0.18.0
func (fs *FileSystem) DeleteUserMetadataByAVU(username string, zoneName string, attName string, attValue string, attUnits string) error
DeleteUserMetadataByAVU deletes a user metadata by AVU
func (*FileSystem) DeleteUserMetadataByName ¶ added in v0.14.4
func (fs *FileSystem) DeleteUserMetadataByName(username string, zoneName string, attName string) error
DeleteUserMetadataByName deletes a user metadata by name
func (*FileSystem) DownloadFile ¶
func (fs *FileSystem) DownloadFile(irodsPath string, resource string, localPath string, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, 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, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileParallel downloads a file to local in parallel
func (*FileSystem) DownloadFileParallelResumable ¶ added in v0.12.20
func (fs *FileSystem) DownloadFileParallelResumable(irodsPath string, resource string, localPath string, taskNum int, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileParallelResumable downloads a file to local in parallel with support of transfer resume
func (*FileSystem) DownloadFileParallelResumableWithConnections ¶ added in v0.18.0
func (fs *FileSystem) DownloadFileParallelResumableWithConnections(conns []*connection.IRODSConnection, irodsPath string, resource string, localPath string, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileParallelResumableWithConnections downloads a file to local in parallel with support of transfer resume
func (*FileSystem) DownloadFileParallelWithCallback ¶ added in v0.21.1
func (fs *FileSystem) DownloadFileParallelWithCallback(irodsPath string, resource string, blockSize int, numBlocks int, blockReadyCallback common.DataObjectBlockCallback, taskNum int, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileParallelWithCallback downloads a file in parallel via callback
func (*FileSystem) DownloadFileParallelWithCallbackWithConnections ¶ added in v0.21.1
func (fs *FileSystem) DownloadFileParallelWithCallbackWithConnections(conns []*connection.IRODSConnection, irodsPath string, resource string, blockSize int, numBlocks int, blockReadyCallback common.DataObjectBlockCallback, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileParallelWithCallbackWithConnections downloads a file in parallel via callback
func (*FileSystem) DownloadFileParallelWithConnections ¶ added in v0.18.0
func (fs *FileSystem) DownloadFileParallelWithConnections(conns []*connection.IRODSConnection, irodsPath string, resource string, localPath string, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileParallelWithConnections downloads a file to local in parallel
func (*FileSystem) DownloadFileRedirectToResource ¶ added in v0.14.0
func (fs *FileSystem) DownloadFileRedirectToResource(irodsPath string, resource string, localPath string, taskNum int, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileRedirectToResource downloads a file from resource to local in parallel
func (*FileSystem) DownloadFileRedirectToResourceWithConnection ¶ added in v0.18.0
func (fs *FileSystem) DownloadFileRedirectToResourceWithConnection(controlConn *connection.IRODSConnection, irodsPath string, resource string, localPath string, taskNum int, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileRedirectToResourceWithConnection downloads a file from resource to local in parallel
func (*FileSystem) DownloadFileResumable ¶ added in v0.12.20
func (fs *FileSystem) DownloadFileResumable(irodsPath string, resource string, localPath string, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileResumable downloads a file to local with support of transfer resume
func (*FileSystem) DownloadFileResumableWithConnection ¶ added in v0.18.0
func (fs *FileSystem) DownloadFileResumableWithConnection(conn *connection.IRODSConnection, irodsPath string, resource string, localPath string, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileResumableWithConnection downloads a file to local with support of transfer resume
func (*FileSystem) DownloadFileToBuffer ¶ added in v0.12.8
func (fs *FileSystem) DownloadFileToBuffer(irodsPath string, resource string, buffer *bytes.Buffer, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileToBuffer downloads a file to buffer
func (*FileSystem) DownloadFileToBufferWithConnection ¶ added in v0.18.0
func (fs *FileSystem) DownloadFileToBufferWithConnection(conn *connection.IRODSConnection, irodsPath string, resource string, buffer *bytes.Buffer, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileToBufferWithConnection downloads a file to buffer
func (*FileSystem) DownloadFileWithCallback ¶ added in v0.21.1
func (fs *FileSystem) DownloadFileWithCallback(irodsPath string, resource string, blockSize int, numBlocks int, blockReadyCallback common.DataObjectBlockCallback, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileWithCallback downloads a file via callback
func (*FileSystem) DownloadFileWithCallbackWithConnection ¶ added in v0.21.1
func (fs *FileSystem) DownloadFileWithCallbackWithConnection(conn *connection.IRODSConnection, irodsPath string, resource string, blockSize int, numBlocks int, blockReadyCallback common.DataObjectBlockCallback, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileWithCallbackWithConnection downloads a file via callback
func (*FileSystem) DownloadFileWithConnection ¶ added in v0.18.0
func (fs *FileSystem) DownloadFileWithConnection(conn *connection.IRODSConnection, irodsPath string, resource string, localPath string, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
DownloadFileWithConnection downloads a file to local
func (*FileSystem) Exists ¶
func (fs *FileSystem) Exists(irodsPath string) bool
Exists checks file/directory existence
func (*FileSystem) ExistsDir ¶
func (fs *FileSystem) ExistsDir(irodsPath string) bool
ExistsDir checks directory existence
func (*FileSystem) ExistsDirFresh ¶ added in v0.21.0
func (fs *FileSystem) ExistsDirFresh(irodsPath string) bool
ExistsDirFresh checks directory existence bypassing cache (always fresh from iRODS server) Use this for strong consistency requirements, especially after mutations or across separate FileSystem instances
func (*FileSystem) ExistsFile ¶
func (fs *FileSystem) ExistsFile(irodsPath string) bool
ExistsFile checks file existence
func (*FileSystem) ExistsFileFresh ¶ added in v0.21.0
func (fs *FileSystem) ExistsFileFresh(irodsPath string) bool
ExistsFileFresh checks file existence bypassing cache (always fresh from iRODS server) Use this for strong consistency requirements, especially after mutations or across separate FileSystem instances
func (*FileSystem) ExistsFresh ¶ added in v0.21.0
func (fs *FileSystem) ExistsFresh(irodsPath string) bool
ExistsFresh checks file/directory existence bypassing cache (always fresh from iRODS server) Use this for strong consistency requirements, especially after mutations or across separate FileSystem instances
func (*FileSystem) ExtractStructFile ¶ added in v0.9.4
func (fs *FileSystem) ExtractStructFile(path string, targetCollection string, resource string, dataType types.DataType, force bool, bulkReg bool) error
ExtractStructFile extracts a struct file
func (*FileSystem) GetAccount ¶ added in v0.18.0
func (fs *FileSystem) GetAccount() *types.IRODSAccount
GetAccount returns IRODS account
func (*FileSystem) GetConfig ¶ added in v0.18.0
func (fs *FileSystem) GetConfig() *FileSystemConfig
GetConfig returns file system config
func (*FileSystem) GetDirACLInheritance ¶ added in v0.14.6
func (fs *FileSystem) GetDirACLInheritance(path string) (*types.IRODSAccessInheritance, error)
GetDirACLInheritance returns ACL inheritance of a directory
func (*FileSystem) GetDirStatistics ¶ added in v0.20.0
func (fs *FileSystem) GetDirStatistics(irodsPath string, recurse bool) (*DirStat, error)
func (*FileSystem) GetHomeDirPath ¶ added in v0.18.0
func (fs *FileSystem) GetHomeDirPath() string
GetHomeDirPath returns the home directory path
func (*FileSystem) GetID ¶ added in v0.9.0
func (fs *FileSystem) GetID() string
GetID returns file system instance ID
func (*FileSystem) GetIOConnection ¶ added in v0.11.0
func (fs *FileSystem) GetIOConnection(allowShared bool) (*connection.IRODSConnection, error)
GetIOConnection returns irods connection for IO
func (*FileSystem) GetIOSession ¶ added in v0.18.0
func (fs *FileSystem) GetIOSession() *session.IRODSSession
GetIOSession returns IO session
func (*FileSystem) GetLogger ¶ added in v0.21.1
func (fs *FileSystem) GetLogger() *log.Entry
GetLogger returns file system logger
func (*FileSystem) GetMetadataConnection ¶ added in v0.11.0
func (fs *FileSystem) GetMetadataConnection(allowShared bool) (*connection.IRODSConnection, error)
GetMetadataConnection returns irods connection for metadata operations
func (*FileSystem) GetMetadataSession ¶ added in v0.18.0
func (fs *FileSystem) GetMetadataSession() *session.IRODSSession
GetMetadataSession returns metadata session
func (*FileSystem) GetMetrics ¶ added in v0.9.7
func (fs *FileSystem) GetMetrics() *metrics.IRODSMetrics
GetMetrics returns metrics
func (*FileSystem) GetOpenConnections ¶ added in v0.18.0
func (fs *FileSystem) GetOpenConnections() int
GetOpenConnections counts current open connections
func (*FileSystem) GetServerVersion ¶ added in v0.10.9
func (fs *FileSystem) GetServerVersion() (*types.IRODSVersion, error)
GetServerVersion returns server version info
func (*FileSystem) GetTicket ¶ added in v0.12.1
func (fs *FileSystem) GetTicket(ticketName string) (*types.IRODSTicket, error)
GetTicket gets ticket information
func (*FileSystem) GetTicketForAnonymousAccess ¶ added in v0.7.0
func (fs *FileSystem) GetTicketForAnonymousAccess(ticketName string) (*types.IRODSTicketForAnonymousAccess, error)
GetTicketForAnonymousAccess gets ticket information for anonymous access
func (*FileSystem) GetTicketRestrictions ¶ added in v0.12.0
func (fs *FileSystem) GetTicketRestrictions(ticketID int64) (*IRODSTicketRestrictions, error)
GetTicketRestrictions gets all restriction info. for the given ticket
func (*FileSystem) GetUser ¶ added in v0.16.0
func (fs *FileSystem) GetUser(username string, zoneName string, userType types.IRODSUserType) (*types.IRODSUser, error)
GetUser returns a user or a group
func (*FileSystem) InvalidateCacheForDirCreate ¶ added in v0.19.8
func (fs *FileSystem) InvalidateCacheForDirCreate(path string)
InvalidateCacheForDirCreate invalidates cache for creation of the given dir
func (*FileSystem) InvalidateCacheForDirRemove ¶ added in v0.19.8
func (fs *FileSystem) InvalidateCacheForDirRemove(path string, recurse bool)
InvalidateCacheForDirRemove invalidates cache for removal of the given dir
func (*FileSystem) InvalidateCacheForDirUpdate ¶ added in v0.19.8
func (fs *FileSystem) InvalidateCacheForDirUpdate(path string)
InvalidateCacheForDirUpdate invalidates cache for update of the given dir
func (*FileSystem) InvalidateCacheForFileCreate ¶ added in v0.19.8
func (fs *FileSystem) InvalidateCacheForFileCreate(path string)
InvalidateCacheForFileCreate invalidates cache for creation of the given file
func (*FileSystem) InvalidateCacheForFileRemove ¶ added in v0.19.8
func (fs *FileSystem) InvalidateCacheForFileRemove(path string)
InvalidateCacheForFileRemove invalidates cache for removal of the given file
func (*FileSystem) InvalidateCacheForFileUpdate ¶ added in v0.19.8
func (fs *FileSystem) InvalidateCacheForFileUpdate(path string)
InvalidateCacheForFileUpdate invalidates cache for update on the given file
func (*FileSystem) InvalidateCacheForPath ¶ added in v0.19.10
func (fs *FileSystem) InvalidateCacheForPath(path string)
InvalidateCacheForPath invalidates cache for the given path (general purpose)
func (*FileSystem) IsTicketAccess ¶ added in v0.15.9
func (fs *FileSystem) IsTicketAccess() bool
IsTicketAccess returns if the access is authenticated using ticket
func (*FileSystem) List ¶
func (fs *FileSystem) List(irodsPath 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) ListACLsForEntries ¶ added in v0.9.4
func (fs *FileSystem) ListACLsForEntries(path string) ([]*types.IRODSAccess, error)
ListACLsForEntries returns ACLs for entries in a collection
func (*FileSystem) ListACLsWithGroupUsers ¶ added in v0.3.0
func (fs *FileSystem) ListACLsWithGroupUsers(path string) ([]*types.IRODSAccess, error)
ListACLsWithGroupUsers returns ACLs
func (*FileSystem) ListAllProcesses ¶ added in v0.9.7
func (fs *FileSystem) ListAllProcesses() ([]*types.IRODSProcess, error)
ListAllProcesses lists all processes
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) ListDirACLsWithGroupMembers ¶ added in v0.16.0
func (fs *FileSystem) ListDirACLsWithGroupMembers(path string) ([]*types.IRODSAccess, error)
ListDirACLsWithGroupMembers 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) ListFileACLsWithGroupMembers ¶ added in v0.16.0
func (fs *FileSystem) ListFileACLsWithGroupMembers(path string) ([]*types.IRODSAccess, error)
ListFileACLsWithGroupMembers returns ACLs of a file
func (*FileSystem) ListFresh ¶ added in v0.21.0
func (fs *FileSystem) ListFresh(irodsPath string) ([]*Entry, error)
ListFresh lists all file system entries under the given path bypassing cache (always fresh from iRODS server) Use this for strong consistency requirements, especially after mutations or across separate FileSystem instances
func (*FileSystem) ListGroupMemberNames ¶ added in v0.16.0
func (fs *FileSystem) ListGroupMemberNames(zoneName string, groupName string) ([]string, error)
ListGroupMemberNames lists all member names in a group
func (*FileSystem) ListGroupMembers ¶ added in v0.16.0
func (fs *FileSystem) ListGroupMembers(zoneName string, groupName string) ([]*types.IRODSUser, error)
ListGroupMembers lists all members in a group
func (*FileSystem) ListMetadata ¶ added in v0.4.0
func (fs *FileSystem) ListMetadata(irodsPath string) ([]*types.IRODSMeta, error)
ListMetadata lists metadata for the given path
func (*FileSystem) ListProcesses ¶ added in v0.9.7
func (fs *FileSystem) ListProcesses(address string, zoneName string) ([]*types.IRODSProcess, error)
ListProcesses lists all processes
func (*FileSystem) ListResourceMetadata ¶ added in v0.14.4
func (fs *FileSystem) ListResourceMetadata(resource string) ([]*types.IRODSMeta, error)
ListResourceMetadata lists all resource metadata
func (*FileSystem) ListTicketHostRestrictions ¶ added in v0.12.0
func (fs *FileSystem) ListTicketHostRestrictions(ticketID int64) ([]string, error)
ListTicketHostRestrictions lists all host restrictions for the given ticket
func (*FileSystem) ListTicketUserGroupRestrictions ¶ added in v0.12.0
func (fs *FileSystem) ListTicketUserGroupRestrictions(ticketID int64) ([]string, error)
ListTicketUserGroupRestrictions lists all group name restrictions for the given ticket
func (*FileSystem) ListTicketUserNameRestrictions ¶ added in v0.12.0
func (fs *FileSystem) ListTicketUserNameRestrictions(ticketID int64) ([]string, error)
ListTicketUserNameRestrictions lists all user name restrictions for the given ticket
func (*FileSystem) ListTickets ¶ added in v0.12.0
func (fs *FileSystem) ListTickets() ([]*types.IRODSTicket, error)
ListTickets lists all available ticket information
func (*FileSystem) ListTicketsBasic ¶ added in v0.12.0
func (fs *FileSystem) ListTicketsBasic() ([]*types.IRODSTicket, error)
ListTicketsBasic lists all available basic ticket information
func (*FileSystem) ListUserGroupNames ¶ added in v0.16.0
func (fs *FileSystem) ListUserGroupNames(zoneName string, username string) ([]string, error)
ListUserGroupNames lists all group names that a user belongs to
func (*FileSystem) ListUserGroups ¶ added in v0.5.9
ListUserGroups lists all groups that a user belongs to
func (*FileSystem) ListUserMetadata ¶ added in v0.4.5
func (fs *FileSystem) ListUserMetadata(username string, zoneName string) ([]*types.IRODSMeta, error)
ListUserMetadata lists all user metadata
func (*FileSystem) ListUsers ¶ added in v0.4.5
func (fs *FileSystem) ListUsers(zoneName string, userType types.IRODSUserType) ([]*types.IRODSUser, error)
ListUsers lists all users
func (*FileSystem) LockDataObject ¶ added in v0.21.1
func (fs *FileSystem) LockDataObject(irodsPath string, wait bool) (*types.IRODSFileLockHandle, error)
LockDataObject locks data object with write lock (exclusive)
func (*FileSystem) MakeDir ¶
func (fs *FileSystem) MakeDir(irodsPath string, recurse bool) error
MakeDir creates a directory
func (*FileSystem) ModifyTicketExpirationTime ¶ added in v0.12.0
func (fs *FileSystem) ModifyTicketExpirationTime(ticketName string, expirationTime time.Time) error
ModifyTicketExpirationTime modifies the expiration time of the given ticket
func (*FileSystem) ModifyTicketUseLimit ¶ added in v0.12.0
func (fs *FileSystem) ModifyTicketUseLimit(ticketName string, uses int64) error
ModifyTicketUseLimit modifies the use limit of the given ticket
func (*FileSystem) ModifyTicketWriteByteLimit ¶ added in v0.12.0
func (fs *FileSystem) ModifyTicketWriteByteLimit(ticketName string, bytes int64) error
ModifyTicketWriteByteLimit modifies the write byte limit of the given ticket
func (*FileSystem) ModifyTicketWriteFileLimit ¶ added in v0.12.0
func (fs *FileSystem) ModifyTicketWriteFileLimit(ticketName string, count int64) error
ModifyTicketWriteFileLimit modifies the write file limit of the given ticket
func (*FileSystem) OpenFile ¶
func (fs *FileSystem) OpenFile(irodsPath string, resource string, mode string) (*FileHandle, error)
OpenFile opens an existing file for read/write
func (*FileSystem) RLockDataObject ¶ added in v0.21.1
func (fs *FileSystem) RLockDataObject(irodsPath string, wait bool) (*types.IRODSFileLockHandle, error)
RLockDataObject locks data object with read lock
func (*FileSystem) RemoveCacheEventHandler ¶ added in v0.10.6
func (fs *FileSystem) RemoveCacheEventHandler(handlerID string)
RemoveCacheEventHandler removes cache event handler
func (*FileSystem) RemoveDir ¶
func (fs *FileSystem) RemoveDir(irodsPath string, recurse bool, force bool) error
RemoveDir deletes a directory
func (*FileSystem) RemoveFile ¶
func (fs *FileSystem) RemoveFile(irodsPath string, force bool) error
RemoveFile deletes a file
func (*FileSystem) RemoveGroupMember ¶ added in v0.16.0
func (fs *FileSystem) RemoveGroupMember(groupName string, username string, zoneName string) error
RemoveGroupMember removes a user from a group
func (*FileSystem) RemoveTicketAllowedGroup ¶ added in v0.12.0
func (fs *FileSystem) RemoveTicketAllowedGroup(ticketName string, groupName string) error
RemoveTicketAllowedGroup removes the group from the allowed group names list of the given ticket
func (*FileSystem) RemoveTicketAllowedHost ¶ added in v0.12.0
func (fs *FileSystem) RemoveTicketAllowedHost(ticketName string, host string) error
RemoveTicketAllowedHost removes the host from the allowed hosts list of the given ticket
func (*FileSystem) RemoveTicketAllowedUser ¶ added in v0.12.0
func (fs *FileSystem) RemoveTicketAllowedUser(ticketName string, userName string) error
RemoveTicketAllowedUser removes the user from the allowed user names list of the given ticket
func (*FileSystem) RemoveUser ¶ added in v0.16.0
func (fs *FileSystem) RemoveUser(username string, zoneName string, userType types.IRODSUserType) error
RemoveUser removes a user
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(irodsPath string, resource string, update bool) error
ReplicateFile replicates a file
func (*FileSystem) ReturnIOConnection ¶ added in v0.11.0
func (fs *FileSystem) ReturnIOConnection(conn *connection.IRODSConnection) error
ReturnIOConnection returns irods connection for IO back to session
func (*FileSystem) ReturnMetadataConnection ¶ added in v0.11.0
func (fs *FileSystem) ReturnMetadataConnection(conn *connection.IRODSConnection) error
ReturnMetadataConnection returns irods connection for metadata operations back to session
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) SearchDirUnixWildcard ¶ added in v0.16.4
func (fs *FileSystem) SearchDirUnixWildcard(pathUnixWildcard string) ([]*Entry, error)
func (*FileSystem) SearchFileUnixWildcard ¶ added in v0.16.4
func (fs *FileSystem) SearchFileUnixWildcard(pathUnixWildcard string) ([]*Entry, error)
func (*FileSystem) SearchUnixWildcard ¶ added in v0.16.3
func (fs *FileSystem) SearchUnixWildcard(pathUnixWildcard string) ([]*Entry, error)
func (*FileSystem) Stat ¶
func (fs *FileSystem) Stat(irodsPath string) (*Entry, error)
Stat returns file status
func (*FileSystem) StatDir ¶
func (fs *FileSystem) StatDir(irodsPath string) (*Entry, error)
StatDir returns status of a directory
func (*FileSystem) StatDirFresh ¶ added in v0.21.0
func (fs *FileSystem) StatDirFresh(irodsPath string) (*Entry, error)
StatDirFresh returns status of a directory bypassing cache (always fresh from iRODS server) Use this for strong consistency requirements, especially after mutations or across separate FileSystem instances
func (*FileSystem) StatFile ¶
func (fs *FileSystem) StatFile(irodsPath string) (*Entry, error)
StatFile returns status of a file
func (*FileSystem) StatFileFresh ¶ added in v0.21.0
func (fs *FileSystem) StatFileFresh(irodsPath string) (*Entry, error)
StatFileFresh returns status of a file bypassing cache (always fresh from iRODS server) Use this for strong consistency requirements, especially after mutations or across separate FileSystem instances
func (*FileSystem) StatFresh ¶ added in v0.21.0
func (fs *FileSystem) StatFresh(irodsPath string) (*Entry, error)
StatFresh returns file status bypassing cache (always fresh from iRODS server) Use this for strong consistency requirements, especially after mutations or across separate FileSystem instances
func (*FileSystem) StatProcess ¶ added in v0.18.0
func (fs *FileSystem) StatProcess(address string, zoneName string) ([]*types.IRODSProcess, error)
StatProcess stats processes
func (*FileSystem) SupportParallelUpload ¶ added in v0.10.9
func (fs *FileSystem) SupportParallelUpload() bool
SupportParallelUpload returns if the server supports parallel upload
func (*FileSystem) Touch ¶ added in v0.15.0
func (fs *FileSystem) Touch(irodsPath string, resource string, noCreate bool, replicaNumber *int, referencePath string, secondsSinceEpoch *int) error
Touch creates an empty file or update timestamp
func (*FileSystem) TruncateFile ¶
func (fs *FileSystem) TruncateFile(irodsPath string, size int64) error
TruncateFile truncates a file
func (*FileSystem) UnlockDataObject ¶ added in v0.21.1
func (fs *FileSystem) UnlockDataObject(lockHandle *types.IRODSFileLockHandle) error
UnlockDataObject unlocks data object
func (*FileSystem) UploadFile ¶
func (fs *FileSystem) UploadFile(localPath string, irodsPath string, resource string, replicate bool, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
UploadFile uploads a local file to irods
func (*FileSystem) UploadFileFromBuffer ¶ added in v0.12.8
func (fs *FileSystem) UploadFileFromBuffer(buffer *bytes.Buffer, irodsPath string, resource string, replicate bool, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
UploadFileFromBuffer uploads buffer data to irods
func (*FileSystem) UploadFileFromBufferWithConnection ¶ added in v0.18.0
func (fs *FileSystem) UploadFileFromBufferWithConnection(conn *connection.IRODSConnection, buffer *bytes.Buffer, irodsPath string, resource string, replicate bool, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
UploadFileFromBufferWithConnection uploads buffer data to irods
func (*FileSystem) UploadFileParallel ¶ added in v0.5.2
func (fs *FileSystem) UploadFileParallel(localPath string, irodsPath string, resource string, taskNum int, replicate bool, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
UploadFileParallel uploads a local file to irods in parallel
func (*FileSystem) UploadFileParallelWithConnections ¶ added in v0.18.0
func (fs *FileSystem) UploadFileParallelWithConnections(conns []*connection.IRODSConnection, localPath string, irodsPath string, resource string, taskNum int, replicate bool, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
UploadFileParallelWithConnections uploads a local file to irods in parallel
func (*FileSystem) UploadFileRedirectToResource ¶ added in v0.16.5
func (fs *FileSystem) UploadFileRedirectToResource(localPath string, irodsPath string, resource string, taskNum int, replicate bool, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
UploadFileRedirectToResource uploads a file from local to resource server in parallel
func (*FileSystem) UploadFileRedirectToResourceWithConnection ¶ added in v0.18.0
func (fs *FileSystem) UploadFileRedirectToResourceWithConnection(controlConn *connection.IRODSConnection, localPath string, irodsPath string, resource string, taskNum int, replicate bool, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
UploadFileRedirectToResourceWithConnection uploads a file from local to resource server in parallel
func (*FileSystem) UploadFileWithConnection ¶ added in v0.18.0
func (fs *FileSystem) UploadFileWithConnection(conn *connection.IRODSConnection, localPath string, irodsPath string, resource string, replicate bool, verifyChecksum bool, transferCallback common.TransferTrackerCallback) (*FileTransferResult, error)
UploadFileWithConnection uploads a local file to irods
type FileSystemCache ¶
type FileSystemCache struct {
// contains filtered or unexported fields
}
FileSystemCache manages filesystem caches
func NewFileSystemCache ¶
func NewFileSystemCache(config *CacheConfig, accountID string) *FileSystemCache
NewFileSystemCache creates a new FileSystemCache accountID: unique account identifier (typically hash of host:port|account|zone)
func (*FileSystemCache) AddAclCache ¶ added in v0.16.0
func (cache *FileSystemCache) AddAclCache(path string, accesses []*types.IRODSAccess)
AddAclCache adds a ACLs cache
func (*FileSystemCache) AddAclCacheMulti ¶ added in v0.16.0
func (cache *FileSystemCache) AddAclCacheMulti(accesses []*types.IRODSAccess)
AddAclCacheMulti adds multiple ACLs caches
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) AddGroupMemberCache ¶ added in v0.16.0
func (cache *FileSystemCache) AddGroupMemberCache(groupName string, zoneName string, usernames []string)
AddGroupMemberCache adds group member (users in a group) cache
func (*FileSystemCache) AddMetadataCache ¶ added in v0.4.0
func (cache *FileSystemCache) AddMetadataCache(path string, metas []*types.IRODSMeta)
AddMetadataCache adds a metadata cache
func (*FileSystemCache) AddNegativeEntryCache ¶ added in v0.7.0
func (cache *FileSystemCache) AddNegativeEntryCache(path string)
AddNegativeEntryCache adds a negative entry cache
func (*FileSystemCache) AddUserCache ¶ added in v0.16.0
func (cache *FileSystemCache) AddUserCache(user *types.IRODSUser)
AddUserCache adds a user cache (cache of a user)
func (*FileSystemCache) AddUserCacheMulti ¶ added in v0.16.0
func (cache *FileSystemCache) AddUserCacheMulti(users []*types.IRODSUser)
AddUserCacheMulti adds multiple user caches (cache of a user)
func (*FileSystemCache) AddUserGroupCache ¶ added in v0.16.0
func (cache *FileSystemCache) AddUserGroupCache(zoneName string, username string, groupNames []string)
AddUserGroupCache adds a user's groups (groups that a user belongs to) cache
func (*FileSystemCache) AddUserListCache ¶ added in v0.16.0
func (cache *FileSystemCache) AddUserListCache(zoneName string, userType types.IRODSUserType, usernames []string)
AddUserListCache adds a user list cache (cache of a list of all user names)
func (*FileSystemCache) ClearAclCache ¶ added in v0.16.0
func (cache *FileSystemCache) ClearAclCache()
ClearAclCache clears all ACLs caches
func (*FileSystemCache) ClearAllGroupMembersCache ¶ added in v0.16.0
func (cache *FileSystemCache) ClearAllGroupMembersCache()
ClearAllGroupMembersCache clears all group members (users in a group) caches
func (*FileSystemCache) ClearAllUserCache ¶ added in v0.16.0
func (cache *FileSystemCache) ClearAllUserCache()
ClearAllUserCache clears all user caches
func (*FileSystemCache) ClearAllUserListCache ¶ added in v0.16.0
func (cache *FileSystemCache) ClearAllUserListCache()
ClearAllUserListCache clears all user 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) ClearGroupMembersCacheForZone ¶ added in v0.16.0
func (cache *FileSystemCache) ClearGroupMembersCacheForZone(zoneName string)
ClearGroupMembersCacheForZone clears all group members (users in a group) caches for a zone
func (*FileSystemCache) ClearMetadataCache ¶ added in v0.4.0
func (cache *FileSystemCache) ClearMetadataCache()
ClearMetadataCache clears all metadata caches
func (*FileSystemCache) ClearNegativeEntryCache ¶ added in v0.7.0
func (cache *FileSystemCache) ClearNegativeEntryCache()
ClearNegativeEntryCache clears all negative entry caches
func (*FileSystemCache) ClearUserCacheForZone ¶ added in v0.16.0
func (cache *FileSystemCache) ClearUserCacheForZone(zoneName string)
ClearUserCacheForZone clears user caches for a zone
func (*FileSystemCache) ClearUserGroupCacheForZone ¶ added in v0.16.0
func (cache *FileSystemCache) ClearUserGroupCacheForZone(zoneName string)
ClearUserGroupCache clears all user's groups caches for a zone
func (*FileSystemCache) ClearUserListCacheForZone ¶ added in v0.16.0
func (cache *FileSystemCache) ClearUserListCacheForZone(zoneName string)
ClearUserListCacheForZone clears all user list caches for a zone
func (*FileSystemCache) Close ¶ added in v0.21.0
func (cache *FileSystemCache) Close()
Close closes the cache backend and releases resources
func (*FileSystemCache) GetAclCache ¶ added in v0.16.0
func (cache *FileSystemCache) GetAclCache(path string) []*types.IRODSAccess
GetAclCache retrives a 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) GetGroupMemberCache ¶ added in v0.16.0
func (cache *FileSystemCache) GetGroupMemberCache(groupName string, zoneName string) []string
GetGroupMemberCache retrives group members (users in a group) cache
func (*FileSystemCache) GetMetadataCache ¶ added in v0.4.0
func (cache *FileSystemCache) GetMetadataCache(path string) []*types.IRODSMeta
GetMetadataCache retrieves a metadata cache
func (*FileSystemCache) GetUserCache ¶ added in v0.16.0
func (cache *FileSystemCache) GetUserCache(username string, zoneName string) *types.IRODSUser
GetUserCache retrives a user cache (cache of a user)
func (*FileSystemCache) GetUserGroupCache ¶ added in v0.16.0
func (cache *FileSystemCache) GetUserGroupCache(zoneName string, username string) []string
GetUserGroupCache retrives a user's groups (groups that a user belongs to) cache
func (*FileSystemCache) GetUserListCache ¶ added in v0.16.0
func (cache *FileSystemCache) GetUserListCache(zoneName string, userType types.IRODSUserType) []string
GetUserListCache retrives a user list cache (cache of a list of all users)
func (*FileSystemCache) HasNegativeEntryCache ¶ added in v0.7.0
func (cache *FileSystemCache) HasNegativeEntryCache(path string) bool
HasNegativeEntryCache checks the existence of a negative entry cache
func (*FileSystemCache) RemoveAclCache ¶ added in v0.16.0
func (cache *FileSystemCache) RemoveAclCache(path string)
RemoveAclCache removes a ACLs cache
func (*FileSystemCache) RemoveAllNegativeEntryCacheForPath ¶ added in v0.7.0
func (cache *FileSystemCache) RemoveAllNegativeEntryCacheForPath(path string)
RemoveAllNegativeEntryCacheForPath removes all negative entry caches
func (*FileSystemCache) RemoveDirCache ¶
func (cache *FileSystemCache) RemoveDirCache(path string)
RemoveDirCache removes a dir cache
func (*FileSystemCache) RemoveDirEntryCache ¶ added in v0.15.8
func (cache *FileSystemCache) RemoveDirEntryCache(path string, recurse bool)
RemoveDirEntryCache removes an entry cache for dir
func (*FileSystemCache) RemoveEntryCache ¶
func (cache *FileSystemCache) RemoveEntryCache(path string)
RemoveEntryCache removes an entry cache
func (*FileSystemCache) RemoveGroupMemberCache ¶ added in v0.16.0
func (cache *FileSystemCache) RemoveGroupMemberCache(groupName string, zoneName string)
RemoveGroupMemberCache removes group users (users in a group) cache
func (*FileSystemCache) RemoveMetadataCache ¶ added in v0.4.0
func (cache *FileSystemCache) RemoveMetadataCache(path string)
RemoveMetadataCache removes a metadata cache
func (*FileSystemCache) RemoveNegativeEntryCache ¶ added in v0.7.0
func (cache *FileSystemCache) RemoveNegativeEntryCache(path string)
RemoveNegativeEntryCache removes a negative entry cache
func (*FileSystemCache) RemoveParentDirEntryCache ¶ added in v0.15.8
func (cache *FileSystemCache) RemoveParentDirEntryCache(path string, recurse bool)
RemoveParentDirCache removes an entry cache for the parent path of the given path
func (*FileSystemCache) RemoveUserCache ¶ added in v0.16.0
func (cache *FileSystemCache) RemoveUserCache(username string, zoneName string)
RemoveUserCache removes a user cache (cache of a user)
func (*FileSystemCache) RemoveUserGroupCache ¶ added in v0.16.0
func (cache *FileSystemCache) RemoveUserGroupCache(zoneName string, username string)
RemoveUserGroupCache removes a user's groups (groups that a user belongs to) cache
func (*FileSystemCache) RemoveUserListCache ¶ added in v0.16.0
func (cache *FileSystemCache) RemoveUserListCache(zoneName string, userType types.IRODSUserType)
RemoveUserListCache removes a user list cache (cache of a list of all users)
type FileSystemConfig ¶
type FileSystemConfig struct {
ApplicationName string `yaml:"application_name,omitempty" json:"application_name,omitempty"`
MetadataConnection ConnectionConfig `yaml:"metadata_connection,omitempty" json:"metadata_connection,omitempty"`
IOConnection ConnectionConfig `yaml:"io_connection,omitempty" json:"io_connection,omitempty"`
Cache CacheConfig `yaml:"cache,omitempty" json:"cache,omitempty"`
AddressResolver session.AddressResolver `yaml:"-" json:"-"`
Logger *log.Logger `yaml:"-" json:"-"`
LogEntry *log.Entry `yaml:"-" json:"-"`
}
FileSystemConfig is a struct for file system configuration
func NewFileSystemConfig ¶
func NewFileSystemConfig(applicationName string) *FileSystemConfig
NewFileSystemConfig create a FileSystemConfig with a default settings
func (*FileSystemConfig) ToIOSessionConfig ¶ added in v0.15.0
func (config *FileSystemConfig) ToIOSessionConfig() *session.IRODSSessionConfig
ToIOSessionConfig creates a IRODSSessionConfig from FileSystemConfig
func (*FileSystemConfig) ToMetadataSessionConfig ¶ added in v0.15.0
func (config *FileSystemConfig) ToMetadataSessionConfig() *session.IRODSSessionConfig
ToMetadataSessionConfig creates a IRODSSessionConfig from FileSystemConfig
type FileTransferResult ¶ added in v0.14.12
type FileTransferResult struct {
IRODSCheckSumAlgorithm types.ChecksumAlgorithm `json:"irods_checksum_algorithm"`
IRODSPath string `json:"irods_path"`
IRODSCheckSum []byte `json:"irods_checksum"`
IRODSSize int64 `json:"irods_size"`
LocalCheckSumAlgorithm types.ChecksumAlgorithm `json:"local_checksum_algorithm"`
LocalPath string `json:"local_path"`
LocalCheckSum []byte `json:"local_checksum"`
LocalSize int64 `json:"local_size"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
}
FileTransferResult a file transfer result
type FilesystemCacheEventHandler ¶ added in v0.10.6
type FilesystemCacheEventHandler func(path string, eventType FilesystemCacheEventType)
FilesystemCacheEventHandler is a cache event handler type
type FilesystemCacheEventHandlerMap ¶ added in v0.10.6
type FilesystemCacheEventHandlerMap struct {
// contains filtered or unexported fields
}
FilesystemCacheEventHandlerMap manages FilesystemCacheEventHandler
func NewFilesystemCacheEventHandlerMap ¶ added in v0.10.6
func NewFilesystemCacheEventHandlerMap() *FilesystemCacheEventHandlerMap
NewFilesystemCacheEventHandlerMap creates a new FilesystemCacheEventHandlerMap
func (*FilesystemCacheEventHandlerMap) AddEventHandler ¶ added in v0.10.6
func (handlerMap *FilesystemCacheEventHandlerMap) AddEventHandler(handler FilesystemCacheEventHandler) string
AddEventHandler adds cache eventh handler
func (*FilesystemCacheEventHandlerMap) GetEventHandler ¶ added in v0.10.6
func (handlerMap *FilesystemCacheEventHandlerMap) GetEventHandler(handlerID string) FilesystemCacheEventHandler
GetEventHandler returns event handler for the id
func (*FilesystemCacheEventHandlerMap) GetEventHandlerIDs ¶ added in v0.10.6
func (handlerMap *FilesystemCacheEventHandlerMap) GetEventHandlerIDs() []string
GetEventHandlerIDs returns all event handler ids
func (*FilesystemCacheEventHandlerMap) GetEventHandlers ¶ added in v0.10.6
func (handlerMap *FilesystemCacheEventHandlerMap) GetEventHandlers() []FilesystemCacheEventHandler
GetEventHandlers returns all event handlers
func (*FilesystemCacheEventHandlerMap) Release ¶ added in v0.10.6
func (handlerMap *FilesystemCacheEventHandlerMap) Release()
Release releases resources
func (*FilesystemCacheEventHandlerMap) RemoveEventHandler ¶ added in v0.10.6
func (handlerMap *FilesystemCacheEventHandlerMap) RemoveEventHandler(handlerID string)
RemoveEventHandler removes cache eventh handler
func (*FilesystemCacheEventHandlerMap) SendDirCreateEvent ¶ added in v0.10.6
func (handlerMap *FilesystemCacheEventHandlerMap) SendDirCreateEvent(path string)
SendDirCreateEvent sends dir create event
func (*FilesystemCacheEventHandlerMap) SendDirExtractEvent ¶ added in v0.13.1
func (handlerMap *FilesystemCacheEventHandlerMap) SendDirExtractEvent(path string)
SendDirExtractEvent sends dir extract event
func (*FilesystemCacheEventHandlerMap) SendDirRemoveEvent ¶ added in v0.10.6
func (handlerMap *FilesystemCacheEventHandlerMap) SendDirRemoveEvent(path string)
SendDirRemoveEvent sends dir remove event
func (*FilesystemCacheEventHandlerMap) SendEvent ¶ added in v0.10.6
func (handlerMap *FilesystemCacheEventHandlerMap) SendEvent(path string, eventType FilesystemCacheEventType)
SendEvent sends event
func (*FilesystemCacheEventHandlerMap) SendFileCreateEvent ¶ added in v0.10.6
func (handlerMap *FilesystemCacheEventHandlerMap) SendFileCreateEvent(path string)
SendFileCreateEvent sends file create event
func (*FilesystemCacheEventHandlerMap) SendFileRemoveEvent ¶ added in v0.10.6
func (handlerMap *FilesystemCacheEventHandlerMap) SendFileRemoveEvent(path string)
SendFileRemoveEvent sends file remove event
func (*FilesystemCacheEventHandlerMap) SendFileUpdateEvent ¶ added in v0.10.6
func (handlerMap *FilesystemCacheEventHandlerMap) SendFileUpdateEvent(path string)
SendFileUpdateEvent sends file update event
type FilesystemCacheEventType ¶ added in v0.10.6
type FilesystemCacheEventType string
FilesystemCacheEventType defines cache
const ( // FilesystemCacheFileCreateEvent is an event type for file creation FilesystemCacheFileCreateEvent FilesystemCacheEventType = "file create" // FilesystemCacheFileRemoveEvent is an event type for file removal FilesystemCacheFileRemoveEvent FilesystemCacheEventType = "file remove" // FilesystemCacheFileUpdateEvent is an event type for file update FilesystemCacheFileUpdateEvent FilesystemCacheEventType = "file update" // FilesystemCacheDirCreateEvent is an event type for dir creation FilesystemCacheDirCreateEvent FilesystemCacheEventType = "dir create" // FilesystemCacheDirRemoveEvent is an event type for dir removal FilesystemCacheDirRemoveEvent FilesystemCacheEventType = "dir remove" // FilesystemCacheDirExtractEvent is an event type for dir extract FilesystemCacheDirExtractEvent FilesystemCacheEventType = "dir extract" )
type IRODSTicketRestrictions ¶ added in v0.12.0
type IRODSTicketRestrictions struct {
// AllowedHosts is a list of allowed hosts
AllowedHosts []string `json:"allowed_hosts"`
// AllowedUserName is a list of allowed user names
AllowedUserNames []string `json:"allowed_user_names"`
// AllowedGroupNames is a list of allowed group names
AllowedGroupNames []string `json:"allowed_group_names"`
}
IRODSTicketRestrictions contains irods ticket restriction information
func (*IRODSTicketRestrictions) ToString ¶ added in v0.12.0
func (ticket *IRODSTicketRestrictions) ToString() string
ToString stringifies the object
type MemoryBackendConfig ¶ added in v0.21.0
type MemoryBackendConfig struct {
// Cleanup interval for expired entries
CleanupInterval time.Duration `yaml:"cleanup_interval,omitempty" json:"cleanup_interval,omitempty"`
// Default TTL for cache entries
DefaultTTL time.Duration `yaml:"default_ttl,omitempty" json:"default_ttl,omitempty"`
}
MemoryBackendConfig configures the in-memory go-cache backend
func NewDefaultMemoryBackendConfig ¶ added in v0.21.0
func NewDefaultMemoryBackendConfig() *MemoryBackendConfig
NewDefaultMemoryBackendConfig creates a default memory backend configuration
func (*MemoryBackendConfig) Validate ¶ added in v0.21.0
func (c *MemoryBackendConfig) Validate() error
type MemoryCacheBackend ¶ added in v0.21.0
type MemoryCacheBackend struct {
// contains filtered or unexported fields
}
MemoryCacheBackend implements CacheBackend using go-cache Each namespace has its own independent cache
func NewMemoryCacheBackend ¶ added in v0.21.0
func NewMemoryCacheBackend(config *MemoryBackendConfig) *MemoryCacheBackend
NewMemoryCacheBackend creates a new in-memory cache backend with config
func (*MemoryCacheBackend) Clear ¶ added in v0.21.0
func (m *MemoryCacheBackend) Clear() error
Clear removes all entries from the cache
func (*MemoryCacheBackend) Close ¶ added in v0.21.0
func (m *MemoryCacheBackend) Close() error
Close closes the backend (no-op for in-memory backend)
func (*MemoryCacheBackend) DeleteNamespace ¶ added in v0.21.0
func (m *MemoryCacheBackend) DeleteNamespace(namespace string) error
DeleteNamespace removes all entries in a namespace
func (*MemoryCacheBackend) GetNamespace ¶ added in v0.21.0
func (m *MemoryCacheBackend) GetNamespace(namespace string) (CacheNamespace, error)
GetNamespace returns a namespace interface for isolated storage WARNING: Use GetNamespaceForAccount() for multi-account safety!
type MemoryNamespace ¶ added in v0.21.0
type MemoryNamespace struct {
// contains filtered or unexported fields
}
MemoryNamespace represents an isolated cache space
func (*MemoryNamespace) Clear ¶ added in v0.21.0
func (mn *MemoryNamespace) Clear() error
Clear removes all entries in this namespace
func (*MemoryNamespace) Delete ¶ added in v0.21.0
func (mn *MemoryNamespace) Delete(key string) error
Delete removes a key
func (*MemoryNamespace) DeletePrefix ¶ added in v0.21.0
func (mn *MemoryNamespace) DeletePrefix(prefix string) error
DeletePrefix removes all keys with a given prefix
func (*MemoryNamespace) Exists ¶ added in v0.21.0
func (mn *MemoryNamespace) Exists(key string) (bool, error)
Exists checks if a key exists
func (*MemoryNamespace) Get ¶ added in v0.21.0
func (mn *MemoryNamespace) Get(key string) (interface{}, bool, error)
Get retrieves a value
type MetadataCacheTimeoutSetting ¶ added in v0.6.1
type MetadataCacheTimeoutSetting struct {
Path string `yaml:"path" json:"path"`
Timeout types.Duration `yaml:"timeout" json:"timeout"`
Inherit bool `yaml:"inherit,omitempty" json:"inherit,omitempty"`
}
MetadataCacheTimeoutSetting defines cache timeout for path
type NoCacheBackend ¶ added in v0.21.0
type NoCacheBackend struct {
}
NoCacheBackend implements CacheBackend as a no-op (caching disabled)
func NewNoCacheBackend ¶ added in v0.21.0
func NewNoCacheBackend() *NoCacheBackend
NewNoCacheBackend creates a no-cache backend
func (*NoCacheBackend) Clear ¶ added in v0.21.0
func (n *NoCacheBackend) Clear() error
Clear is a no-op
func (*NoCacheBackend) Close ¶ added in v0.21.0
func (n *NoCacheBackend) Close() error
Close is a no-op
func (*NoCacheBackend) DeleteNamespace ¶ added in v0.21.0
func (n *NoCacheBackend) DeleteNamespace(namespace string) error
DeleteNamespace is a no-op
func (*NoCacheBackend) GetNamespace ¶ added in v0.21.0
func (n *NoCacheBackend) GetNamespace(namespace string) (CacheNamespace, error)
GetNamespace returns a no-op namespace
type NoCacheNamespace ¶ added in v0.21.0
type NoCacheNamespace struct {
}
NoCacheNamespace implements CacheNamespace as a no-op
func (*NoCacheNamespace) Clear ¶ added in v0.21.0
func (n *NoCacheNamespace) Clear() error
Clear is a no-op
func (*NoCacheNamespace) Delete ¶ added in v0.21.0
func (n *NoCacheNamespace) Delete(key string) error
Delete is a no-op
func (*NoCacheNamespace) DeletePrefix ¶ added in v0.21.0
func (n *NoCacheNamespace) DeletePrefix(prefix string) error
DeletePrefix is a no-op
func (*NoCacheNamespace) Exists ¶ added in v0.21.0
func (n *NoCacheNamespace) Exists(key string) (bool, error)
Exists returns false
func (*NoCacheNamespace) Get ¶ added in v0.21.0
func (n *NoCacheNamespace) Get(key string) (interface{}, bool, error)
Get returns nil, false
type RedisBackendConfig ¶ added in v0.21.0
type RedisBackendConfig struct {
// Redis server address (host:port)
Address string `yaml:"address,omitempty" json:"address,omitempty"`
// Database number (0-15)
DB int `yaml:"db,omitempty" json:"db,omitempty"`
// Optional authentication password
Password string `yaml:"password,omitempty" json:"password,omitempty"`
// Connection pool size
PoolSize int `yaml:"pool_size,omitempty" json:"pool_size,omitempty"`
// Key prefix for all cache entries (useful for multi-tenant scenarios)
KeyPrefix string `yaml:"key_prefix,omitempty" json:"key_prefix,omitempty"`
// Connection timeout
ConnectTimeout time.Duration `yaml:"connect_timeout,omitempty" json:"connect_timeout,omitempty"`
// Command timeout
CommandTimeout time.Duration `yaml:"command_timeout,omitempty" json:"command_timeout,omitempty"`
// Default TTL for cache entries
DefaultTTL time.Duration `yaml:"default_ttl,omitempty" json:"default_ttl,omitempty"`
// Enable account-based namespace isolation for security
// When true, cache keys are automatically prefixed with "account|zone"
// This prevents different iRODS accounts from accessing each other's cached data
// Recommended: true (for security), false (for performance if only single account)
EnableAccountIsolation bool `yaml:"enable_account_isolation,omitempty" json:"enable_account_isolation,omitempty"`
}
RedisBackendConfig configures the Redis backend
func NewDefaultRedisBackendConfig ¶ added in v0.21.0
func NewDefaultRedisBackendConfig() *RedisBackendConfig
NewDefaultRedisBackendConfig creates a default redis backend configuration
func (*RedisBackendConfig) Validate ¶ added in v0.21.0
func (c *RedisBackendConfig) Validate() error
type RedisCacheBackend ¶ added in v0.21.0
type RedisCacheBackend struct {
// contains filtered or unexported fields
}
RedisCacheBackend implements CacheBackend using Redis This allows distributed caching across multiple instances
func NewRedisCacheBackend ¶ added in v0.21.0
func NewRedisCacheBackend(config *RedisBackendConfig) (*RedisCacheBackend, error)
NewRedisCacheBackend creates a new Redis cache backend
func (*RedisCacheBackend) Clear ¶ added in v0.21.0
func (r *RedisCacheBackend) Clear() error
Clear removes only entries owned by this cache backend.
func (*RedisCacheBackend) Close ¶ added in v0.21.0
func (r *RedisCacheBackend) Close() error
Close closes the Redis connection
func (*RedisCacheBackend) DeleteNamespace ¶ added in v0.21.0
func (r *RedisCacheBackend) DeleteNamespace(namespace string) error
DeleteNamespace removes all entries in a namespace
func (*RedisCacheBackend) GetNamespace ¶ added in v0.21.0
func (r *RedisCacheBackend) GetNamespace(namespace string) (CacheNamespace, error)
GetNamespace returns a namespace interface for isolated storage WARNING: Use GetNamespaceForAccount() for multi-account safety!
type RedisNamespace ¶ added in v0.21.0
type RedisNamespace struct {
// contains filtered or unexported fields
}
RedisNamespace represents an isolated cache space for Redis
func (*RedisNamespace) Clear ¶ added in v0.21.0
func (rn *RedisNamespace) Clear() error
Clear removes all entries in this namespace
func (*RedisNamespace) Delete ¶ added in v0.21.0
func (rn *RedisNamespace) Delete(key string) error
Delete removes a namespaced key
func (*RedisNamespace) DeletePrefix ¶ added in v0.21.0
func (rn *RedisNamespace) DeletePrefix(prefix string) error
DeletePrefix removes all keys with a given prefix within this namespace
func (*RedisNamespace) Exists ¶ added in v0.21.0
func (rn *RedisNamespace) Exists(key string) (bool, error)
Exists checks if a namespaced key exists
func (*RedisNamespace) Get ¶ added in v0.21.0
func (rn *RedisNamespace) Get(key string) (interface{}, bool, error)
Get retrieves a namespaced value
type RistrettoBackendConfig ¶ added in v0.21.0
type RistrettoBackendConfig struct {
// Maximum number of entries in the cache
MaxEntries int64 `yaml:"max_entries,omitempty" json:"max_entries,omitempty"`
// Cost per entry (used for eviction)
// When total cost exceeds MaxCost, entries are evicted
MaxCost int64 `yaml:"max_cost,omitempty" json:"max_cost,omitempty"`
// Number of buffers for concurrent access
BufferItems int64 `yaml:"buffer_items,omitempty" json:"buffer_items,omitempty"`
// Default TTL for cache entries
DefaultTTL time.Duration `yaml:"default_ttl,omitempty" json:"default_ttl,omitempty"`
}
RistrettoBackendConfig configures the Ristretto backend
func NewDefaultRistrettoBackendConfig ¶ added in v0.21.0
func NewDefaultRistrettoBackendConfig() *RistrettoBackendConfig
NewDefaultRistrettoBackendConfig creates a default ristretto backend configuration
func (*RistrettoBackendConfig) Validate ¶ added in v0.21.0
func (c *RistrettoBackendConfig) Validate() error
type RistrettoCacheBackend ¶ added in v0.21.0
type RistrettoCacheBackend struct {
// contains filtered or unexported fields
}
RistrettoCacheBackend implements CacheBackend using Ristretto Ristretto is a high-performance caching library optimized for speed and memory efficiency Each namespace has its own independent cache
func NewRistrettoCacheBackend ¶ added in v0.21.0
func NewRistrettoCacheBackend(config *RistrettoBackendConfig) (*RistrettoCacheBackend, error)
NewRistrettoCacheBackend creates a new Ristretto cache backend
func (*RistrettoCacheBackend) Clear ¶ added in v0.21.0
func (r *RistrettoCacheBackend) Clear() error
Clear removes all entries from the cache
func (*RistrettoCacheBackend) Close ¶ added in v0.21.0
func (r *RistrettoCacheBackend) Close() error
Close closes the backend
func (*RistrettoCacheBackend) DeleteNamespace ¶ added in v0.21.0
func (r *RistrettoCacheBackend) DeleteNamespace(namespace string) error
DeleteNamespace removes all entries in a namespace
func (*RistrettoCacheBackend) GetNamespace ¶ added in v0.21.0
func (r *RistrettoCacheBackend) GetNamespace(namespace string) (CacheNamespace, error)
GetNamespace returns a namespace interface for isolated storage WARNING: Use GetNamespaceForAccount() for multi-account safety!
type RistrettoNamespace ¶ added in v0.21.0
type RistrettoNamespace struct {
// contains filtered or unexported fields
}
RistrettoNamespace represents an isolated cache space for Ristretto
func (*RistrettoNamespace) Clear ¶ added in v0.21.0
func (rn *RistrettoNamespace) Clear() error
Clear removes all entries in this namespace
func (*RistrettoNamespace) Delete ¶ added in v0.21.0
func (rn *RistrettoNamespace) Delete(key string) error
Delete removes a namespaced key
func (*RistrettoNamespace) DeletePrefix ¶ added in v0.21.0
func (rn *RistrettoNamespace) DeletePrefix(prefix string) error
DeletePrefix removes all keys with a given prefix within this namespace
func (*RistrettoNamespace) Exists ¶ added in v0.21.0
func (rn *RistrettoNamespace) Exists(key string) (bool, error)
Exists checks if a namespaced key exists
func (*RistrettoNamespace) Get ¶ added in v0.21.0
func (rn *RistrettoNamespace) Get(key string) (interface{}, bool, error)
Get retrieves a namespaced value
Source Files
¶
- cache.go
- cache_backend.go
- cache_backend_memory.go
- cache_backend_none.go
- cache_backend_redis.go
- cache_backend_ristretto.go
- cache_factory.go
- cache_manager.go
- cache_metrics.go
- config.go
- file_handle.go
- file_handle_map.go
- file_lock.go
- fs.go
- fs_acl.go
- fs_bulk.go
- fs_cache.go
- fs_cache_update_event_handler_map.go
- fs_dir_stat.go
- fs_entry.go
- fs_metadata.go
- fs_process.go
- fs_structfile.go
- fs_system.go
- fs_ticket.go
- fs_ticket_restrictions.go
- fs_touch.go
- fs_usergroup.go