mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-15 14:48:16 +00:00
[client-go #1415] Use transformer from provided store within internal stores in reflector to limit memory usage bursts
Signed-off-by: Valerian Roche <valerian.roche@datadoghq.com> Kubernetes-commit: 585ed0a5cb378e794e4775bc846d5309ca65f2c6
This commit is contained in:
committed by
Kubernetes Publisher
parent
c2ce9a8b31
commit
71776a84bd
10
tools/cache/the_real_fifo.go
vendored
10
tools/cache/the_real_fifo.go
vendored
@@ -18,11 +18,12 @@ package cache
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
utiltrace "k8s.io/utils/trace"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// RealFIFO is a Queue in which every notification from the Reflector is passed
|
||||
@@ -389,6 +390,11 @@ func (f *RealFIFO) Resync() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Transformer implements the TransformingStore interface.
|
||||
func (f *RealFIFO) Transformer() TransformFunc {
|
||||
return f.transformer
|
||||
}
|
||||
|
||||
// NewRealFIFO returns a Store which can be used to queue up items to
|
||||
// process.
|
||||
func NewRealFIFO(keyFunc KeyFunc, knownObjects KeyListerGetter, transformer TransformFunc) *RealFIFO {
|
||||
|
Reference in New Issue
Block a user