(event *gohan_sync.Event)
| 128 | } |
| 129 | |
| 130 | func (watcher *StateWatcher) processEvent(event *gohan_sync.Event) { |
| 131 | var err error |
| 132 | if strings.HasPrefix(event.Key, statePrefix) { |
| 133 | err = watcher.StateUpdate(event) |
| 134 | log.Info("Completed StateUpdate") |
| 135 | } else if strings.HasPrefix(event.Key, monitoringPrefix) { |
| 136 | err = watcher.MonitoringUpdate(event) |
| 137 | log.Info("Completed MonitoringUpdate") |
| 138 | } |
| 139 | if err != nil { |
| 140 | log.Warning(fmt.Sprintf("error during state update: %s", err)) |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | //StateUpdate updates the state in the db based on the sync event |
| 145 | // todo: make private once tests are fixed |
no test coverage detected