Пример #1
0
func signalHandler(be backend.Backend) {
	for {
		select {
		case sig := <-signalchan:
			fmt.Printf("!! Caught signal %d... shutting down\n", sig)
			be.Sync()
			return
		}
	}
}
Пример #2
0
func (s *Service) save(be backend.Backend, ref *Service, ts int64) {
	be.SaveService(&s.data)
}
Пример #3
0
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)
}