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

Method Add

tools/cache/store.go:123–130  ·  view source on GitHub ↗

Add inserts an item into the cache.

(obj interface{})

Source from the content-addressed store, hash-verified

121
122// Add inserts an item into the cache.
123func (c *cache) Add(obj interface{}) error {
124 key, err := c.keyFunc(obj)
125 if err != nil {
126 return KeyError{obj, err}
127 }
128 c.cacheStorage.Add(key, obj)
129 return nil
130}
131
132// Update sets an item in the cache to its updated state.
133func (c *cache) Update(obj interface{}) error {

Callers

nothing calls this directly

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected