MCPcopy Create free account
hub / github.com/koding/kite / cancelWatcher

Method cancelWatcher

kontrol/_watcher.go:24–34  ·  view source on GitHub ↗
(watcherID string)

Source from the content-addressed store, hash-verified

22}
23
24func (k *Kontrol) cancelWatcher(watcherID string) error {
25 k.watchersMutex.Lock()
26 defer k.watchersMutex.Unlock()
27 watcher, ok := k.watchers[watcherID]
28 if !ok {
29 return errors.New("Watcher not found")
30 }
31 watcher.Stop()
32 delete(k.watchers, watcherID)
33 return nil
34}
35
36// TODO watchAndSendKiteEvents takes too many arguments. Refactor it.
37func (k *Kontrol) watchAndSendKiteEvents(

Callers 1

handleCancelWatcherMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected