Documentation
¶
Index ¶
- Constants
- Variables
- func AddSchedule(dbConn *sql.DB, s BackupSchedule) (string, error)
- func AddStatus(dbConn *sql.DB, status BackupStatus) (string, error)
- func AddStatusClient(ipaddress string, status BackupStatus) (string, error)
- func BackupNowClient(ipaddress string, request BackupRequest) (string, error)
- func DeleteSchedule(dbConn *sql.DB, id string) error
- func LoadSchedules() error
- func ProvisionBackupJob(dbConn *sql.DB, args *BackupRequest) error
- func ReloadClient(ipaddress string, sched BackupSchedule) (string, error)
- func UpdateSchedule(dbConn *sql.DB, s BackupSchedule) error
- func UpdateStatus(dbConn *sql.DB, status BackupStatus) error
- func UpdateStatusClient(ipaddress string, status BackupStatus) (string, error)
- type BackupProfile
- type BackupRequest
- type BackupSchedule
- type BackupStatus
- type Command
- type DefaultJob
Constants ¶
View Source
const CLUSTERADMIN_DB = "clusteradmin"
Variables ¶
View Source
var CRONInstance *cron.Cron
global cron instance that gets started, stopped, restarted
Functions ¶
func AddSchedule ¶
func AddSchedule(dbConn *sql.DB, s BackupSchedule) (string, error)
func AddStatusClient ¶
func AddStatusClient(ipaddress string, status BackupStatus) (string, error)
called by backup jobs as they execute
func BackupNowClient ¶
func BackupNowClient(ipaddress string, request BackupRequest) (string, error)
called by admin do perform an adhoc backup job
func LoadSchedules ¶
func LoadSchedules() error
func ProvisionBackupJob ¶
func ProvisionBackupJob(dbConn *sql.DB, args *BackupRequest) error
func ReloadClient ¶
func ReloadClient(ipaddress string, sched BackupSchedule) (string, error)
called by admin to add to reload schedules in the backup server
func UpdateSchedule ¶
func UpdateSchedule(dbConn *sql.DB, s BackupSchedule) error
func UpdateStatus ¶
func UpdateStatus(dbConn *sql.DB, status BackupStatus) error
func UpdateStatusClient ¶
func UpdateStatusClient(ipaddress string, status BackupStatus) (string, error)
called by backup jobs as they execute
Types ¶
type BackupProfile ¶
type BackupRequest ¶
type BackupSchedule ¶
type BackupSchedule struct { ID string ServerID string ServerName string ServerIP string ContainerName string ProfileName string Name string Enabled string Minutes string Hours string DayOfMonth string Month string DayOfWeek string UpdateDt string }
func GetAllSchedules ¶
func GetAllSchedules(dbConn *sql.DB, containerid string) ([]BackupSchedule, error)
func GetSchedule ¶
func GetSchedule(dbConn *sql.DB, id string) (BackupSchedule, error)
func GetSchedules ¶
func GetSchedules(dbConn *sql.DB) ([]BackupSchedule, error)
type BackupStatus ¶
type BackupStatus struct { ID string ContainerName string StartTime string BackupName string ProfileName string ServerName string ServerIP string ScheduleID string Path string ElapsedTime string BackupSize string Status string UpdateDt string }
func GetAllStatus ¶
func GetAllStatus(dbConn *sql.DB, scheduleid string) ([]BackupStatus, error)
type Command ¶
type Command struct {
Output string
}
func (*Command) AddStatus ¶
func (t *Command) AddStatus(status *BackupStatus, reply *Command) error
called by backup jobs as they execute
func (*Command) BackupNow ¶
func (t *Command) BackupNow(args *BackupRequest, reply *Command) error
called by admin do perform an adhoc backup job
func (*Command) Reload ¶
func (t *Command) Reload(schedule *BackupSchedule, reply *Command) error
called by admin to cause a reload of the cron jobs
func (*Command) UpdateStatus ¶
func (t *Command) UpdateStatus(status *BackupStatus, reply *Command) error
called by backup jobs as they execute
type DefaultJob ¶
type DefaultJob struct {
// contains filtered or unexported fields
}
func (DefaultJob) Run ¶
func (t DefaultJob) Run()
this is the func that implements the cron Job interface
Click to show internal directories.
Click to hide internal directories.