MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / authPreferredInterval

Function authPreferredInterval

sdk/cliproxy/auth/conductor.go:5370–5381  ·  view source on GitHub ↗
(a *Auth)

Source from the content-addressed store, hash-verified

5368}
5369
5370func authPreferredInterval(a *Auth) time.Duration {
5371 if a == nil {
5372 return 0
5373 }
5374 if d := durationFromMetadata(a.Metadata, "refresh_interval_seconds", "refreshIntervalSeconds", "refresh_interval", "refreshInterval"); d > 0 {
5375 return d
5376 }
5377 if d := durationFromAttributes(a.Attributes, "refresh_interval_seconds", "refreshIntervalSeconds", "refresh_interval", "refreshInterval"); d > 0 {
5378 return d
5379 }
5380 return 0
5381}
5382
5383func durationFromMetadata(meta map[string]any, keys ...string) time.Duration {
5384 if len(meta) == 0 {

Callers 2

nextRefreshCheckAtFunction · 0.85
shouldRefreshMethod · 0.85

Calls 2

durationFromMetadataFunction · 0.85
durationFromAttributesFunction · 0.85

Tested by

no test coverage detected