MCPcopy Index your code
hub / github.com/coder/coder / MarkPermanent

Method MarkPermanent

aibridge/keypool/keypool.go:191–201  ·  view source on GitHub ↗

MarkPermanent marks the key as permanently unavailable. This is a terminal state. Returns true if this call transitions the key to permanent.

()

Source from the content-addressed store, hash-verified

189// is a terminal state. Returns true if this call transitions
190// the key to permanent.
191func (k *Key) MarkPermanent() bool {
192 k.mu.Lock()
193 defer k.mu.Unlock()
194
195 if k.permanent {
196 return false
197 }
198
199 k.permanent = true
200 return true
201}
202
203// keyPoolError returns an Error summarizing why no
204// key is currently available. When at least one key is

Callers 7

MarkKeyOnStatusFunction · 0.80
TestStateFunction · 0.80
TestMarkTemporaryFunction · 0.80
TestMarkPermanentFunction · 0.80
TestWalkerNextFunction · 0.80
TestKeyConcurrentFunction · 0.80
TestWalkerIndependenceFunction · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 6

TestStateFunction · 0.64
TestMarkTemporaryFunction · 0.64
TestMarkPermanentFunction · 0.64
TestWalkerNextFunction · 0.64
TestKeyConcurrentFunction · 0.64
TestWalkerIndependenceFunction · 0.64