Documentation ¶
Index ¶
- func OpenFile(path string, readOnly bool, dataPaths []string) (storage.Storage, error)
- type MultiDiskStorage
- func (fs *MultiDiskStorage) Close() error
- func (fs *MultiDiskStorage) Create(fd storage.FileDesc) (storage.Writer, error)
- func (fs *MultiDiskStorage) GetMeta() (storage.FileDesc, error)
- func (fs *MultiDiskStorage) List(ft storage.FileType) (fds []storage.FileDesc, err error)
- func (fs *MultiDiskStorage) Lock() (storage.Locker, error)
- func (fs *MultiDiskStorage) Log(str string)
- func (fs *MultiDiskStorage) MultiGuessOpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (fs *MultiDiskStorage) MultiGuessRemove(name string) error
- func (fs *MultiDiskStorage) MultiGuessStat(name string) (os.FileInfo, error)
- func (fs *MultiDiskStorage) MultiList(ft storage.FileType) (fds []storage.FileDesc, err error)
- func (fs *MultiDiskStorage) MultiOpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (fs *MultiDiskStorage) MultiRemove(name string) error
- func (fs *MultiDiskStorage) MultiStat(name string) (os.FileInfo, error)
- func (fs *MultiDiskStorage) Open(fd storage.FileDesc) (storage.Reader, error)
- func (fs *MultiDiskStorage) Remove(fd storage.FileDesc) error
- func (fs *MultiDiskStorage) Rename(oldfd, newfd storage.FileDesc) error
- func (fs *MultiDiskStorage) SetMeta(fd storage.FileDesc) error
- type MultiDiskStorageLock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MultiDiskStorage ¶
type MultiDiskStorage struct {
// contains filtered or unexported fields
}
MultiDiskStorage is a file-system backed storage.
func (*MultiDiskStorage) Close ¶
func (fs *MultiDiskStorage) Close() error
Close close the instance of MultiDiskStorage
func (*MultiDiskStorage) GetMeta ¶
func (fs *MultiDiskStorage) GetMeta() (storage.FileDesc, error)
GetMeta get meta of instance of MultiDiskStorage
func (*MultiDiskStorage) Lock ¶
func (fs *MultiDiskStorage) Lock() (storage.Locker, error)
Lock keep instance of MultiDiskStorage unavailable
func (*MultiDiskStorage) MultiGuessOpenFile ¶
func (fs *MultiDiskStorage) MultiGuessOpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
MultiGuessOpenFile guess which disk the file located in and open
func (*MultiDiskStorage) MultiGuessRemove ¶
func (fs *MultiDiskStorage) MultiGuessRemove(name string) error
MultiGuessRemove guess which disk the file located in and remove
func (*MultiDiskStorage) MultiGuessStat ¶
func (fs *MultiDiskStorage) MultiGuessStat(name string) (os.FileInfo, error)
MultiGuessStat guess which disk the file located in and stat
func (*MultiDiskStorage) MultiOpenFile ¶
func (fs *MultiDiskStorage) MultiOpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
MultiOpenFile open file in multi disks storage
func (*MultiDiskStorage) MultiRemove ¶
func (fs *MultiDiskStorage) MultiRemove(name string) error
MultiRemove remove file in multi disks storage
func (*MultiDiskStorage) MultiStat ¶
func (fs *MultiDiskStorage) MultiStat(name string) (os.FileInfo, error)
MultiStat stat file in multi disks storage
func (*MultiDiskStorage) Remove ¶
func (fs *MultiDiskStorage) Remove(fd storage.FileDesc) error
Remove remove file with file description of fd
type MultiDiskStorageLock ¶
type MultiDiskStorageLock struct {
// contains filtered or unexported fields
}
MultiDiskStorageLock data structure consists of pointer to MultiDiskStorage
func (*MultiDiskStorageLock) Unlock ¶
func (lock *MultiDiskStorageLock) Unlock()
Unlock keep instance of MultiDiskStorageLock available