Get retrieves a keys state.
(k Key)
| 44 | |
| 45 | // Get retrieves a keys state. |
| 46 | func (km *KeyManager) Get(k Key) KeyState { |
| 47 | km.mutex.RLock() |
| 48 | ks := km.mapper[k] |
| 49 | km.mutex.RUnlock() |
| 50 | |
| 51 | return ks |
| 52 | } |
| 53 | |
| 54 | func (km *KeyManager) update() { |
| 55 | km.mutex.Lock() |
no outgoing calls