refreshLockState classifies the error from acquiring the refresh lock for the refresh_lock dimension.
(lockErr error)
| 90 | |
| 91 | // refreshLockState classifies the error from acquiring the refresh lock for the refresh_lock dimension. |
| 92 | func refreshLockState(lockErr error) string { |
| 93 | switch { |
| 94 | case lockErr == nil: |
| 95 | return refreshLockStateHeld |
| 96 | case isRefreshLockInaccessible(lockErr): |
| 97 | return refreshLockStateInaccessible |
| 98 | case errors.Is(lockErr, flock.ErrTimeout): |
| 99 | return refreshLockStateTimeout |
| 100 | default: |
| 101 | return refreshLockStateUnavailable |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | // refreshStorageErrorKind classifies a credential storage error for the storage_error dimension. |
| 106 | func refreshStorageErrorKind(err error) string { |
no test coverage detected