handleNote dispatches a synchronisation note to the appropriate handler.
(note *SyncNote)
| 475 | |
| 476 | // handleNote dispatches a synchronisation note to the appropriate handler. |
| 477 | func (sc *syncClient) handleNote(note *SyncNote) { |
| 478 | switch note.Type { |
| 479 | case SNTHeartbeat: |
| 480 | log.V(1).Infoln("Sync client received heartbeat") |
| 481 | |
| 482 | case SNTDesync: |
| 483 | sc.handleDesync() |
| 484 | |
| 485 | case SNTConfigUpdate: |
| 486 | sc.handleConfigUpdate(note) |
| 487 | |
| 488 | case SNTHealthcheck: |
| 489 | sc.handleHealthcheck(note) |
| 490 | |
| 491 | case SNTOverride: |
| 492 | sc.handleOverride(note) |
| 493 | |
| 494 | default: |
| 495 | log.Errorf("Unable to handle sync notification type %s (%d)", note.Type, note.Type) |
| 496 | } |
| 497 | } |
| 498 | |
| 499 | // handleDesync handles a desync notification. |
| 500 | func (sc *syncClient) handleDesync() { |
nothing calls this directly
no test coverage detected