MCPcopy
hub / github.com/syncthing/syncthing / Set

Method Set

lib/discover/cache.go:47–51  ·  view source on GitHub ↗
(id protocol.DeviceID, ce CacheEntry)

Source from the content-addressed store, hash-verified

45}
46
47func (c *cache) Set(id protocol.DeviceID, ce CacheEntry) {
48 c.mut.Lock()
49 c.entries[id] = ce
50 c.mut.Unlock()
51}
52
53func (c *cache) Get(id protocol.DeviceID) (CacheEntry, bool) {
54 c.mut.Lock()

Callers 15

getLicenseTextFunction · 0.45
reqFunction · 0.45
generatedNotesFunction · 0.45
sendUsageReportMethod · 0.45
sendFailureReportsFunction · 0.45
clearFunction · 0.45
DialContextMethod · 0.45
testServeFunction · 0.45
ServeFunction · 0.45
setStateMethod · 0.45
setErrorMethod · 0.45
sendSummaryMethod · 0.45

Calls 1

UnlockMethod · 0.80

Tested by 11

testServeFunction · 0.36
handlerMethod · 0.36
testHTTPRequestFunction · 0.36
httpRequestFunction · 0.36
TestCSRFRequiredFunction · 0.36
TestRandomStringFunction · 0.36
testConfigPostFunction · 0.36
TestConfigChangesFunction · 0.36
TestHTTPPOSTWithoutCSRFFunction · 0.36
BenchmarkAPIRequestsFunction · 0.36