mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: bump k8s.io/kubernetes from 1.26.2 to 1.27.2
Bumps [k8s.io/kubernetes](https://github.com/kubernetes/kubernetes) from 1.26.2 to 1.27.2. - [Release notes](https://github.com/kubernetes/kubernetes/releases) - [Commits](https://github.com/kubernetes/kubernetes/compare/v1.26.2...v1.27.2) --- updated-dependencies: - dependency-name: k8s.io/kubernetes dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
0e79135419
commit
07b05616a0
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()
|
||||
|
Reference in New Issue
Block a user