MCPcopy Index your code
hub / github.com/perkeep/perkeep / SetStorage

Method SetStorage

pkg/test/loader.go:70–77  ·  view source on GitHub ↗
(prefix string, s blobserver.Storage)

Source from the content-addressed store, hash-verified

68}
69
70func (ld *Loader) SetStorage(prefix string, s blobserver.Storage) {
71 ld.mu.Lock()
72 defer ld.mu.Unlock()
73 if ld.sto == nil {
74 ld.sto = make(map[string]blobserver.Storage)
75 }
76 ld.sto[prefix] = s
77}
78
79func (ld *Loader) GetStorage(prefix string) (blobserver.Storage, error) {
80 ld.mu.Lock()

Callers 3

TestStorageTestFunction · 0.95
TestStorageTestFunction · 0.95
TestConfigFunction · 0.95

Implementers 2

Loaderpkg/test/loader.go
handlerLoaderpkg/serverinit/serverinit.go

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by 3

TestStorageTestFunction · 0.76
TestStorageTestFunction · 0.76
TestConfigFunction · 0.76