report

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendBackupParams

func AppendBackupParams(infoArr *[]LineInfo, paramsStr string)

func ConstructEmailMessage

func ConstructEmailMessage(timestamp string, contactList string, reportFilePath string, utility string, status bool) string

func EmailReport

func EmailReport(c *cluster.Cluster, timestamp string, reportFilePath string, utility string, status bool)

func EnsureBackupVersionCompatibility

func EnsureBackupVersionCompatibility(backupVersion string, restoreVersion string)

* This function will not error out if the user has gprestore X.Y.Z * and gpbackup X.Y.Z+dev, when technically the uncommitted code changes * in the +dev version of gpbackup may have incompatibilities with the * committed version of gprestore. * * We assume this condition will never arise in practice, as gpbackup and * gprestore will be built with identical versions during development, and * users will never use a +dev version in production.

func EnsureDatabaseVersionCompatibility

func EnsureDatabaseVersionCompatibility(backupGPDBVersion string, restoreGPDBVersion dbconn.GPDBVersion)

func GetContacts

func GetContacts(filename string, utility string) string

func GetDurationInfo

func GetDurationInfo(timestamp string, endTime time.Time) (string, string, string)

func ParseErrorMessage

func ParseErrorMessage(errStr string) string

func PrintObjectCounts

func PrintObjectCounts(reportFile io.WriteCloser, objectCounts map[string]int)

func WriteRestoreReportFile

func WriteRestoreReportFile(reportFilename string, backupTimestamp string, startTimestamp string, connectionPool *dbconn.DBConn, restoreVersion string, origSize int, destSize int, errMsg string)

Types

type ContactFile

type ContactFile struct {
	Contacts map[string][]EmailContact
}

type EmailContact

type EmailContact struct {
	Address string
	Status  map[string]bool
}

type LineInfo

type LineInfo struct {
	Key   string
	Value string
}

type Report

type Report struct {
	BackupParamsString string
	DatabaseSize       string
	history.BackupConfig
}

* This struct holds information that will be printed to the report file * after a backup, as well as information printed to the configuration * file that we will want to read in for a restore.

func (*Report) ConstructBackupParamsString

func (report *Report) ConstructBackupParamsString()

func (*Report) WriteBackupReportFile

func (report *Report) WriteBackupReportFile(reportFilename string, timestamp string, endtime time.Time, objectCounts map[string]int, errMsg string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL