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

Method storeRevision

server/sync_watcher.go:318–324  ·  view source on GitHub ↗

storeRevision puts a reivision number for a path to the sync backend.

(path string, revision int64)

Source from the content-addressed store, hash-verified

316
317// storeRevision puts a reivision number for a path to the sync backend.
318func (watcher *SyncWatcher) storeRevision(path string, revision int64) error {
319 err := watcher.sync.Update(SyncWatchRevisionPrefix+path, strconv.FormatInt(revision, 10))
320 if err != nil {
321 return fmt.Errorf("Failed to update revision number for watch path `%s` in sync storage", path)
322 }
323 return nil
324}
325
326func (watcher *SyncWatcher) measureSyncTime(timeStarted time.Time, action string) {
327 metrics.UpdateTimer(timeStarted, "sync.%s", action)

Callers 1

processSyncWatchMethod · 0.95

Calls 2

UpdateMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected