本文整理匯總了Golang中github.com/crunchydata/crunchy-postgresql-manager/task.TaskStatus.ProfileName方法的典型用法代碼示例。如果您正苦於以下問題:Golang TaskStatus.ProfileName方法的具體用法?Golang TaskStatus.ProfileName怎麽用?Golang TaskStatus.ProfileName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/crunchydata/crunchy-postgresql-manager/task.TaskStatus
的用法示例。
在下文中一共展示了TaskStatus.ProfileName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: sendStats
func sendStats(stats *task.TaskStatus) error {
logit.Info.Println(stats.Status)
stats.ContainerName = restoreContainerName
stats.ScheduleID = restoreScheduleID
stats.ProfileName = "pg_backrest_restore"
stats.Path = restoreContainerName
stats.TaskName = restoreContainerName
stats.ID = StatusID
var addResponse task.StatusAddResponse
var err error
if StatusID != "" {
_, err = task.StatusUpdateClient(stats)
} else {
addResponse, err = task.StatusAddClient(stats)
StatusID = addResponse.ID
}
if err != nil {
logit.Error.Println("error in adding status:" + err.Error())
return err
}
return nil
}
示例2: sendStats
func sendStats(stats *task.TaskStatus) error {
stats.ContainerName = backupContainerName
stats.ScheduleID = scheduleID
stats.ProfileName = backupProfileName
stats.Path = backupPath
stats.TaskName = backupHost
stats.ID = StatusID
fmt.Println("jeff: containername=" + stats.ContainerName)
fmt.Println("jeff: scheduleid=" + stats.ScheduleID)
fmt.Println("jeff: ProfileName=" + stats.ProfileName)
fmt.Println("jeff: Path=" + stats.Path)
fmt.Println("jeff: TaskName=" + stats.TaskName)
fmt.Println("jeff: ID=" + stats.ID)
var addResponse task.StatusAddResponse
var err error
if StatusID != "" {
_, err = task.StatusUpdateClient(stats)
} else {
addResponse, err = task.StatusAddClient(stats)
StatusID = addResponse.ID
}
if err != nil {
fmt.Println(err.Error())
io.WriteString(file, "error in adding status:"+err.Error()+"\n")
return err
}
//send to backup
fmt.Println("elapsed time:" + stats.ElapsedTime)
io.WriteString(file, "elapsed time:"+stats.ElapsedTime+"\n")
fmt.Println("tasksize :" + stats.TaskSize)
io.WriteString(file, "tasksize :"+stats.TaskSize+"\n")
return nil
}