MarkPermanent marks the key as permanently unavailable. This is a terminal state. Returns true if this call transitions the key to permanent.
()
| 189 | // is a terminal state. Returns true if this call transitions |
| 190 | // the key to permanent. |
| 191 | func (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 |