PutKey change keyInfo in keystore cache
(k *keystore.KeyInfo)
| 7 | |
| 8 | // PutKey change keyInfo in keystore cache |
| 9 | func (mf *KeystoreFsm) PutKey(k *keystore.KeyInfo) { |
| 10 | mf.ksMutex.Lock() |
| 11 | defer mf.ksMutex.Unlock() |
| 12 | if _, ok := (mf.keystore)[k.ID]; !ok { |
| 13 | (mf.keystore)[k.ID] = k |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | // GetKey Get keyInfo from keystore cache |
| 18 | func (mf *KeystoreFsm) GetKey(id string) (u *keystore.KeyInfo, err error) { |
no test coverage detected