- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for expirationcache (0.18 sec)
-
pkg/kubelet/util/cache/object_cache.go
limitations under the License. */ package cache import ( "time" expirationcache "k8s.io/client-go/tools/cache" ) // ObjectCache is a simple wrapper of expiration cache that // 1. use string type key // 2. has an updater to get value directly if it is expired // 3. then update the cache type ObjectCache struct { cache expirationcache.Store updater func() (interface{}, error) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 25 04:07:36 UTC 2022 - 2.1K bytes - Viewed (0) -
pkg/kubelet/util/cache/object_cache_test.go
import ( "fmt" "testing" "time" expirationcache "k8s.io/client-go/tools/cache" "k8s.io/utils/clock" testingclock "k8s.io/utils/clock/testing" ) type testObject struct { key string val string } // A fake objectCache for unit test. func NewFakeObjectCache(f func() (interface{}, error), ttl time.Duration, clock clock.Clock) *ObjectCache { ttlPolicy := &expirationcache.TTLPolicy{TTL: ttl, Clock: clock}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 17 13:19:08 UTC 2021 - 2.6K bytes - Viewed (0) -
pkg/controller/controller_utils.go
} // Trigger a sync if we either encountered and error (which shouldn't happen since we're // getting from local store) or this controller hasn't established expectations. return true } // TODO: Extend ExpirationCache to support explicit expiration. // TODO: Make this possible to disable in tests. // TODO: Support injection of clock. func (exp *ControlleeExpectations) isExpired() bool {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jan 12 15:34:44 UTC 2024 - 47.6K bytes - Viewed (0)