Documentation ¶
Overview ¶
Package filebackupstorage implements the BackupStorage interface for a local filesystem (which can be an NFS mount).
Index ¶
- Variables
- func NewBackupHandle(fbs *FileBackupStorage, dir, name string, readOnly bool) backupstorage.BackupHandle
- type FileBackupHandle
- func (fbh *FileBackupHandle) AbortBackup(ctx context.Context) error
- func (fbh *FileBackupHandle) AddFile(ctx context.Context, filename string, filesize int64) (io.WriteCloser, error)
- func (fbh *FileBackupHandle) Directory() string
- func (fbh *FileBackupHandle) EndBackup(ctx context.Context) error
- func (fbh *FileBackupHandle) Error() error
- func (fbh *FileBackupHandle) HasErrors() bool
- func (fbh *FileBackupHandle) Name() string
- func (fbh *FileBackupHandle) ReadFile(ctx context.Context, filename string) (io.ReadCloser, error)
- func (fbh *FileBackupHandle) RecordError(err error)
- type FileBackupStorage
- func (fbs *FileBackupStorage) Close() error
- func (fbs *FileBackupStorage) ListBackups(ctx context.Context, dir string) ([]backupstorage.BackupHandle, error)
- func (fbs *FileBackupStorage) RemoveBackup(ctx context.Context, dir, name string) error
- func (fbs *FileBackupStorage) StartBackup(ctx context.Context, dir, name string) (backupstorage.BackupHandle, error)
- func (fbs *FileBackupStorage) WithParams(params backupstorage.Params) backupstorage.BackupStorage
Constants ¶
This section is empty.
Variables ¶
var ( // FileBackupStorageRoot is where the backups will go. // Exported for test purposes. FileBackupStorageRoot string )
Functions ¶
func NewBackupHandle ¶ added in v0.17.0
func NewBackupHandle( fbs *FileBackupStorage, dir, name string, readOnly bool, ) backupstorage.BackupHandle
Types ¶
type FileBackupHandle ¶
type FileBackupHandle struct {
// contains filtered or unexported fields
}
FileBackupHandle implements BackupHandle for local file system.
func (*FileBackupHandle) AbortBackup ¶
func (fbh *FileBackupHandle) AbortBackup(ctx context.Context) error
AbortBackup is part of the BackupHandle interface
func (*FileBackupHandle) AddFile ¶
func (fbh *FileBackupHandle) AddFile(ctx context.Context, filename string, filesize int64) (io.WriteCloser, error)
AddFile is part of the BackupHandle interface
func (*FileBackupHandle) Directory ¶
func (fbh *FileBackupHandle) Directory() string
Directory is part of the BackupHandle interface
func (*FileBackupHandle) EndBackup ¶
func (fbh *FileBackupHandle) EndBackup(ctx context.Context) error
EndBackup is part of the BackupHandle interface
func (*FileBackupHandle) Error ¶
func (fbh *FileBackupHandle) Error() error
Error is part of the concurrency.ErrorRecorder interface.
func (*FileBackupHandle) HasErrors ¶
func (fbh *FileBackupHandle) HasErrors() bool
HasErrors is part of the concurrency.ErrorRecorder interface.
func (*FileBackupHandle) Name ¶
func (fbh *FileBackupHandle) Name() string
Name is part of the BackupHandle interface
func (*FileBackupHandle) ReadFile ¶
func (fbh *FileBackupHandle) ReadFile(ctx context.Context, filename string) (io.ReadCloser, error)
ReadFile is part of the BackupHandle interface
func (*FileBackupHandle) RecordError ¶
func (fbh *FileBackupHandle) RecordError(err error)
RecordError is part of the concurrency.ErrorRecorder interface.
type FileBackupStorage ¶
type FileBackupStorage struct {
// contains filtered or unexported fields
}
FileBackupStorage implements BackupStorage for local file system.
func (*FileBackupStorage) Close ¶
func (fbs *FileBackupStorage) Close() error
Close implements BackupStorage.
func (*FileBackupStorage) ListBackups ¶
func (fbs *FileBackupStorage) ListBackups(ctx context.Context, dir string) ([]backupstorage.BackupHandle, error)
ListBackups is part of the BackupStorage interface
func (*FileBackupStorage) RemoveBackup ¶
func (fbs *FileBackupStorage) RemoveBackup(ctx context.Context, dir, name string) error
RemoveBackup is part of the BackupStorage interface
func (*FileBackupStorage) StartBackup ¶
func (fbs *FileBackupStorage) StartBackup(ctx context.Context, dir, name string) (backupstorage.BackupHandle, error)
StartBackup is part of the BackupStorage interface
func (*FileBackupStorage) WithParams ¶ added in v0.17.0
func (fbs *FileBackupStorage) WithParams(params backupstorage.Params) backupstorage.BackupStorage