func signalHandler(be backend.Backend) { for { select { case sig := <-signalchan: fmt.Printf("!! Caught signal %d... shutting down\n", sig) be.Sync() return } } }
func (s *Service) save(be backend.Backend, ref *Service, ts int64) { be.SaveService(&s.data) }
func (v *View) save(be backend.Backend, ref *View, ts int64) { if v.data.State != ref.data.State && ref.data.State == model.StateOk { v.data.IncidentNbr += 1 } be.SaveView(&v.data) }