MCPcopy
hub / github.com/cilium/cilium / updateMasterKey

Method updateMasterKey

pkg/allocator/allocator_test.go:134–142  ·  view source on GitHub ↗
(ctx context.Context, id idpool.ID, key AllocatorKey, reliablyMissing bool)

Source from the content-addressed store, hash-verified

132}
133
134func (d *dummyBackend) updateMasterKey(ctx context.Context, id idpool.ID, key AllocatorKey, reliablyMissing bool) error {
135 d.mutex.Lock()
136 defer d.mutex.Unlock()
137 d.masterKeys[id] = key
138 if d.updateMasterKeyHandler != nil {
139 return d.updateMasterKeyHandler(ctx, id, key)
140 }
141 return nil
142}
143
144func (d *dummyBackend) updateSlaveKey(ctx context.Context, id idpool.ID, key AllocatorKey, reliablyMissing bool) error {
145 d.mutex.Lock()

Callers 1

UpdateKeyMethod · 0.95

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected