WIP: states with updater func instead of direct locking

This commit is contained in:
Christian Schwarz
2018-08-16 01:26:09 +02:00
parent 991f13a3da
commit 094eced2c7
4 changed files with 187 additions and 155 deletions
+5
View File
@@ -78,6 +78,11 @@ func (j *ControlJob) JobStart(ctx context.Context) {
requestLogger{log: log, handler: jsonResponder{func() (interface{}, error) {
return daemon.Status(), nil
}}})
mux.Handle("/pulljobreport",
requestLogger{log: log, handler: jsonResponder{func() (interface{}, error) {
j := daemon.conf.Jobs["debian"]
return j.(*PullJob).Report(), nil
}}})
server := http.Server{Handler: mux}
outer: