Update k8s.io/utils to a36077c30491
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
This commit is contained in:
10
vendor/k8s.io/utils/lru/lru.go
generated
vendored
10
vendor/k8s.io/utils/lru/lru.go
generated
vendored
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -22,6 +22,7 @@ import (
|
||||
)
|
||||
|
||||
type Key = groupcache.Key
|
||||
type EvictionFunc = func(key Key, value interface{})
|
||||
|
||||
// Cache is a thread-safe fixed size LRU cache.
|
||||
type Cache struct {
|
||||
@@ -36,6 +37,13 @@ func New(size int) *Cache {
|
||||
}
|
||||
}
|
||||
|
||||
// NewWithEvictionFunc creates an LRU of the given size with the given eviction func.
|
||||
func NewWithEvictionFunc(size int, f EvictionFunc) *Cache {
|
||||
c := New(size)
|
||||
c.cache.OnEvicted = f
|
||||
return c
|
||||
}
|
||||
|
||||
// Add adds a value to the cache.
|
||||
func (c *Cache) Add(key Key, value interface{}) {
|
||||
c.lock.Lock()
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -2390,7 +2390,7 @@ k8s.io/sample-apiserver/pkg/registry/wardle/flunder
|
||||
# k8s.io/system-validators v1.8.0
|
||||
## explicit; go 1.16
|
||||
k8s.io/system-validators/validators
|
||||
# k8s.io/utils v0.0.0-20230202215443-34013725500c
|
||||
# k8s.io/utils v0.0.0-20230209194617-a36077c30491
|
||||
## explicit; go 1.18
|
||||
k8s.io/utils/buffer
|
||||
k8s.io/utils/clock
|
||||
|
Reference in New Issue
Block a user