MCPcopy
hub / github.com/perkeep/perkeep / NewStorage

Function NewStorage

pkg/blobserver/files/files.go:103–110  ·  view source on GitHub ↗
(fs VFS, root string)

Source from the content-addressed store, hash-verified

101func (ds *Storage) SetNewFileGate(g *syncutil.Gate) { ds.tmpFileGate = g }
102
103func NewStorage(fs VFS, root string) *Storage {
104 return &Storage{
105 fs: fs,
106 root: root,
107 dirLockMu: new(sync.RWMutex),
108 statGate: syncutil.NewGate(10), // arbitrary, but bounded; be more clever later?
109 }
110}
111
112func (ds *Storage) tryRemoveDir(dir string) {
113 ds.dirLockMu.Lock()

Callers 3

NewTestStorageFunction · 0.92
NewFunction · 0.92
NewStorageFunction · 0.92

Calls

no outgoing calls

Tested by 1

NewTestStorageFunction · 0.74