ToInternal returns the internal ID associated with the given OID.
(oid uint32)
| 97 | |
| 98 | // ToInternal returns the internal ID associated with the given OID. |
| 99 | func (cache *cacheStruct) ToInternal(oid uint32) Id { |
| 100 | cache.mutex.RLock() |
| 101 | defer cache.mutex.RUnlock() |
| 102 | if id, ok := cache.toInternal[oid]; ok { |
| 103 | return id |
| 104 | } |
| 105 | // The OID is not in the cache, so it's invalid |
| 106 | return "" |
| 107 | } |
| 108 | |
| 109 | // Exists returns whether the given internal ID exists within the cache. This should primarily be used for the default |
| 110 | // functions, as it's not guaranteed that user functions will be in the cache, especially after a server restart. |
no outgoing calls
no test coverage detected