MCPcopy
hub / github.com/kubernetes/client-go / getCreds

Method getCreds

plugin/pkg/client/auth/exec/exec.go:251–262  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249}
250
251func (a *Authenticator) getCreds() (*credentials, error) {
252 a.mu.Lock()
253 defer a.mu.Unlock()
254 if a.cachedCreds != nil && !a.credsExpired() {
255 return a.cachedCreds, nil
256 }
257
258 if err := a.refreshCredsLocked(nil); err != nil {
259 return nil, err
260 }
261 return a.cachedCreds, nil
262}
263
264// maybeRefreshCreds executes the plugin to force a rotation of the
265// credentials, unless they were rotated already.

Callers 2

certMethod · 0.95
RoundTripMethod · 0.80

Calls 2

credsExpiredMethod · 0.95
refreshCredsLockedMethod · 0.95

Tested by

no test coverage detected