MCPcopy Create free account
hub / github.com/cloudwan/gohan / watchExtensionHandler

Method watchExtensionHandler

server/sync_watcher.go:290–300  ·  view source on GitHub ↗
(response *gohan_sync.Event)

Source from the content-addressed store, hash-verified

288}
289
290func (watcher *SyncWatcher) watchExtensionHandler(response *gohan_sync.Event) {
291 defer l.Panic(log)
292 for _, event := range watcher.watchEvents {
293 //match extensions
294 if strings.HasPrefix(response.Key, "/"+event) {
295 env := watcher.watchExtensions[event]
296 watcher.runExtensionOnSync(response, env.Clone())
297 return
298 }
299 }
300}
301
302// fetchStoredRevision returns the revision number stored in the sync backend for a path.
303// When it's a new in the backend, returns sync.RevisionCurrent.

Callers 1

processSyncWatchMethod · 0.95

Calls 3

runExtensionOnSyncMethod · 0.95
PanicMethod · 0.80
CloneMethod · 0.65

Tested by

no test coverage detected