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

Method put

plugin/pkg/client/auth/exec/exec.go:97–106  ·  view source on GitHub ↗

put inserts an authenticator into the cache. If an authenticator is already associated with the key, the first one is returned instead.

(s string, a *Authenticator)

Source from the content-addressed store, hash-verified

95// put inserts an authenticator into the cache. If an authenticator is already
96// associated with the key, the first one is returned instead.
97func (c *cache) put(s string, a *Authenticator) *Authenticator {
98 c.mu.Lock()
99 defer c.mu.Unlock()
100 existing, ok := c.m[s]
101 if ok {
102 return existing
103 }
104 c.m[s] = a
105 return a
106}
107
108// GetAuthenticator returns an exec-based plugin for providing client credentials.
109func GetAuthenticator(config *api.ExecConfig) (*Authenticator, error) {

Callers 1

newAuthenticatorFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected