Versions in this module Expand all Collapse all v0 v0.2.23 May 14, 2021 Changes in this version + func BackupNamesFromBackupTimes(backups []internal.BackupTime) []string + func BackupNamesFromBackups(backups []models.Backup) []string + func LastKnownInBackupTS(backups []models.Backup) (models.Timestamp, error) + func NewBackupMongoMetaConstructor(ctx context.Context, mc client.MongoDriver, folder storage.Folder, ...) internal.MetaConstructor + func OldestBackupAfterTime(backups []models.Backup, after time.Time) (models.Backup, error) + func SelectPurgingOplogArchives(archives []models.Archive, backups []models.Backup, ...) []models.Archive + func SplitPurgingBackups(backups []models.Backup, retainCount *int, retainAfter *time.Time) (purge, retain []models.Backup, err error) + func SplitPurgingOplogArchivesByTS(archives []models.Archive, purgeBeforeTS models.Timestamp) []models.Archive + type BackupInfoMarshalFunc func(b models.Backup) ([]byte, error) + type BackupListing interface + Backups func(backups []models.Backup, output io.Writer) error + Names func(backups []internal.BackupTime, output io.Writer) error + type DiscardUploader struct + func NewDiscardUploader(compressor compression.Compressor, readerFrom io.ReaderFrom) *DiscardUploader + func (d *DiscardUploader) UploadBackup(stream io.Reader, cmd internal.ErrWaiter, ...) error + func (d *DiscardUploader) UploadGapArchive(err error, firstTS, lastTS models.Timestamp) error + func (d *DiscardUploader) UploadOplogArchive(archReader io.Reader, firstTS, lastTS models.Timestamp) error + type Downloader interface + BackupMeta func(name string) (models.Backup, error) + DownloadOplogArchive func(arch models.Archive, writeCloser io.WriteCloser) error + LastKnownArchiveTS func() (models.Timestamp, error) + ListBackups func() ([]internal.BackupTime, []string, error) + ListOplogArchives func() ([]models.Archive, error) + LoadBackups func(names []string) ([]models.Backup, error) + type MongoMetaConstructor struct + func (m *MongoMetaConstructor) Finalize(backupName string) error + func (m *MongoMetaConstructor) Init() error + func (m *MongoMetaConstructor) Meta() models.BackupMeta + func (m *MongoMetaConstructor) MetaInfo() interface{} + type Purger interface + DeleteBackups func(backups []models.Backup) error + DeleteGarbage func(garbage []string) error + DeleteOplogArchives func(archives []models.Archive) error + type Sequence []models.Archive + func SequenceBetweenTS(archives []models.Archive, since, until models.Timestamp) (Sequence, error) + func (p Sequence) Reverse() + type StorageDownloader struct + func NewStorageDownloader(opts StorageSettings) (*StorageDownloader, error) + func (sd *StorageDownloader) BackupMeta(name string) (models.Backup, error) + func (sd *StorageDownloader) DownloadOplogArchive(arch models.Archive, writeCloser io.WriteCloser) error + func (sd *StorageDownloader) LastKnownArchiveTS() (models.Timestamp, error) + func (sd *StorageDownloader) ListBackups() ([]internal.BackupTime, []string, error) + func (sd *StorageDownloader) ListOplogArchives() ([]models.Archive, error) + func (sd *StorageDownloader) LoadBackups(names []string) ([]models.Backup, error) + type StoragePurger struct + func NewStoragePurger(opts StorageSettings) (*StoragePurger, error) + func (sp *StoragePurger) DeleteBackups(backups []models.Backup) error + func (sp *StoragePurger) DeleteGarbage(garbage []string) error + func (sp *StoragePurger) DeleteOplogArchives(archives []models.Archive) error + type StorageSettings struct + func NewDefaultStorageSettings() StorageSettings + type StorageUploader struct + func NewStorageUploader(upl internal.UploaderProvider) *StorageUploader + func (su *StorageUploader) UploadBackup(stream io.Reader, cmd internal.ErrWaiter, ...) error + func (su *StorageUploader) UploadGapArchive(archErr error, firstTS, lastTS models.Timestamp) error + func (su *StorageUploader) UploadOplogArchive(stream io.Reader, firstTS, lastTS models.Timestamp) error + type TabbedBackupListing struct + func NewDefaultTabbedBackupListing() *TabbedBackupListing + func NewTabbedBackupListing(minwidth, tabwidth, padding int, padchar byte, flags uint) *TabbedBackupListing + func (bl *TabbedBackupListing) Backups(backups []models.Backup, output io.Writer) error + func (bl *TabbedBackupListing) Names(backups []internal.BackupTime, output io.Writer) error + type Uploader interface + UploadBackup func(stream io.Reader, cmd internal.ErrWaiter, ...) error + UploadGapArchive func(err error, firstTS, lastTS models.Timestamp) error + UploadOplogArchive func(stream io.Reader, firstTS, lastTS models.Timestamp) error