MCPcopy
hub / github.com/kopia/kopia / NewVersionedMapStorage

Function NewVersionedMapStorage

internal/blobtesting/object_locking_map.go:300–306  ·  view source on GitHub ↗

NewVersionedMapStorage returns an implementation of Storage backed by the contents of an internal in-memory map used primarily for testing.

(timeNow func() time.Time)

Source from the content-addressed store, hash-verified

298// NewVersionedMapStorage returns an implementation of Storage backed by the
299// contents of an internal in-memory map used primarily for testing.
300func NewVersionedMapStorage(timeNow func() time.Time) RetentionStorage {
301 if timeNow == nil {
302 timeNow = clock.Now
303 }
304
305 return &objectLockingMap{data: make(versionedEntries), timeNow: timeNow}
306}

Callers 7

setupInMemoryRepoMethod · 0.92
setupMethod · 0.92
TestUpdateRetentionFunction · 0.92
TestObjectLockingStorageFunction · 0.85

Calls

no outgoing calls