Documentation
¶
Overview ¶
Package walarchive provides support for WAL archive upload
Index ¶
Constants ¶
View Source
const ( // ArchiveCommand defines the pgBackRest command for WAL archive upload ArchiveCommand = "archive-push" // PgbackrestExecutable defines the name of the pgBackRest binary PgbackrestExecutable = "pgbackrest" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PgbackrestArchiver ¶
type PgbackrestArchiver struct {
Env []string
Touch func(walFile string) error
EmptyWalArchivePath string
}
PgbackrestArchiver implements a WAL archiver based on pgbackrest
func (*PgbackrestArchiver) Archive ¶
func (archiver *PgbackrestArchiver) Archive( ctx context.Context, walName string, baseOptions []string, ) error
Archive archives a certain WAL file using pgbackrest archive-push. See archiveWALFileList for the meaning of the parameters
func (*PgbackrestArchiver) ArchiveList ¶
func (archiver *PgbackrestArchiver) ArchiveList( ctx context.Context, walNames []string, options []string, ) (result []WALArchiverResult)
ArchiveList archives a list of WAL files in parallel
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 pgbackrest archive-push
StartTime time.Time
// The time when pgbackrest archive-push ended
EndTime time.Time
}
WALArchiverResult contains the result of the archival of one WAL
Click to show internal directories.
Click to hide internal directories.