MCPcopy Create free account
hub / github.com/cli/cli / refreshLockState

Function refreshLockState

internal/config/refreshable_telemetry.go:80–91  ·  view source on GitHub ↗

refreshLockState classifies the error from acquiring the refresh lock for the refresh_lock dimension.

(lockErr error)

Source from the content-addressed store, hash-verified

78
79// refreshLockState classifies the error from acquiring the refresh lock for the refresh_lock dimension.
80func 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
93func refreshStorageType(secure bool) string {
94 if secure {

Callers 1

Calls 1

Tested by

no test coverage detected