add signal 'snapshot', rename existing signal 'wakeup' to 'replication'

This commit is contained in:
Calistoc
2021-01-01 23:32:35 +01:00
committed by Christian Schwarz
parent 0ceea1b792
commit 2c8c2cfa14
15 changed files with 113 additions and 46 deletions
+4 -2
View File
@@ -143,10 +143,12 @@ func (j *controlJob) Run(ctx context.Context) {
var err error
switch req.Op {
case "wakeup":
err = j.jobs.wakeup(req.Name)
case "replication":
err = j.jobs.doreplication(req.Name)
case "reset":
err = j.jobs.reset(req.Name)
case "snapshot":
err = j.jobs.dosnapshot(req.Name)
default:
err = fmt.Errorf("operation %q is invalid", req.Op)
}