MCPcopy
hub / github.com/cubefs/cubefs / PutKey

Method PutKey

authnode/keystore_cache_op.go:9–15  ·  view source on GitHub ↗

PutKey change keyInfo in keystore cache

(k *keystore.KeyInfo)

Source from the content-addressed store, hash-verified

7
8// PutKey change keyInfo in keystore cache
9func (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
18func (mf *KeystoreFsm) GetKey(id string) (u *keystore.KeyInfo, err error) {

Callers 4

ApplyMethod · 0.95
CreateNewKeyMethod · 0.80
AddCapsMethod · 0.80
DeleteCapsMethod · 0.80

Calls 2

LockMethod · 0.80
UnlockMethod · 0.45

Tested by

no test coverage detected