MCPcopy Create free account
hub / github.com/perkeep/perkeep / currentStatus

Method currentStatus

pkg/server/sync.go:318–336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

316}
317
318func (sh *SyncHandler) currentStatus() syncStatus {
319 sh.mu.Lock()
320 defer sh.mu.Unlock()
321 ago := 0
322 if !sh.recentCopyTime.IsZero() {
323 ago = int(time.Since(sh.recentCopyTime) / time.Second)
324 }
325 return syncStatus{
326 sh: sh,
327 From: sh.fromName,
328 FromDesc: storageDesc(sh.from),
329 To: sh.toName,
330 ToDesc: storageDesc(sh.to),
331 DestIsIndex: sh.toIndex,
332 BlobsToCopy: len(sh.needCopy),
333 BytesToCopy: sh.bytesRemain,
334 LastCopySecAgo: ago,
335 }
336}
337
338// readQueueToMemory slurps in the pending queue from disk (or
339// wherever) to memory. Even with millions of blobs, it's not much

Callers

nothing calls this directly

Calls 3

storageDescFunction · 0.85
LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected