refreshLockState classifies the error from acquiring the refresh lock for the refresh_lock dimension.
(lockErr error)
| 78 | |
| 79 | // refreshLockState classifies the error from acquiring the refresh lock for the refresh_lock dimension. |
| 80 | func refreshLockState(lockErr error) string { |
| 81 | switch { |
| 82 | case lockErr == nil: |
| 83 | return refreshLockStateHeld |
| 84 | case isRefreshLockInaccessible(lockErr): |
| 85 | return refreshLockStateInaccessible |
| 86 | case errors.Is(lockErr, flock.ErrTimeout): |
| 87 | return refreshLockStateTimeout |
| 88 | default: |
| 89 | return refreshLockStateUnavailable |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | func refreshStorageType(secure bool) string { |
| 94 | if secure { |
no test coverage detected