MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Get

Method Get

internal/utils/maps/map_fixed.go:54–59  ·  view source on GitHub ↗
(key KeyT)

Source from the content-addressed store, hash-verified

52}
53
54func (this *FixedMap[KeyT, ValueT]) Get(key KeyT) (value ValueT, ok bool) {
55 this.locker.RLock()
56 defer this.locker.RUnlock()
57 value, ok = this.m[key]
58 return
59}
60
61func (this *FixedMap[KeyT, ValueT]) Has(key KeyT) bool {
62 this.locker.RLock()

Callers 1

TestNewFixedMapFunction · 0.45

Calls 2

RLockMethod · 0.80
RUnlockMethod · 0.80

Tested by 1

TestNewFixedMapFunction · 0.36