Documentation
¶
Overview ¶
Package walarchive implements the wal-archive command
Index ¶
- type BarmanArchiver
- func (archiver *BarmanArchiver) Archive(ctx context.Context, walName string, baseOptions []string) error
- func (archiver *BarmanArchiver) ArchiveList(ctx context.Context, walNames []string, options []string) (result []WALArchiverResult)
- func (archiver *BarmanArchiver) CheckWalArchiveDestination(ctx context.Context, options []string) error
- type WALArchiverResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BarmanArchiver ¶
type BarmanArchiver struct {
Env []string
Touch func(walFile string) error
EmptyWalArchivePath string
}
BarmanArchiver implements a WAL archiver based on Barman cloud
func (*BarmanArchiver) Archive ¶
func (archiver *BarmanArchiver) Archive( ctx context.Context, walName string, baseOptions []string, ) error
Archive archives a certain WAL file using barman-cloud-wal-archive. See archiveWALFileList for the meaning of the parameters
func (*BarmanArchiver) ArchiveList ¶
func (archiver *BarmanArchiver) ArchiveList( ctx context.Context, walNames []string, options []string, ) (result []WALArchiverResult)
ArchiveList archives a list of WAL files in parallel
func (*BarmanArchiver) CheckWalArchiveDestination ¶
func (archiver *BarmanArchiver) CheckWalArchiveDestination(ctx context.Context, options []string) error
CheckWalArchiveDestination checks if the destinationObjectStore is ready perform archiving. Based on this ticket in Barman https://github.com/EnterpriseDB/barman/issues/432 and its implementation https://github.com/EnterpriseDB/barman/pull/443 The idea here is to check ONLY if we're archiving the wal files for the first time in the bucket since in this case the command barman-cloud-check-wal-archive will fail if the bucket exist and contain wal files inside
type WALArchiverResult ¶
type WALArchiverResult struct {
// The WAL that have been archived
WalName string
// If not nil, this is the error that has been detected
Err error
// The time when we started barman-cloud-wal-archive
StartTime time.Time
// The time when end barman-cloud-wal-archive ended
EndTime time.Time
}
WALArchiverResult contains the result of the archival of one WAL