mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-19 09:38:39 +00:00
Add WatchListPageSize to cache.Config
Currently there is no way to specify WatchListPageSize used by Controller. This PR adds a field that can be used to specify this. Change-Id: I241454a45dd94d3ea65a91b297f530e217f843aa Kubernetes-commit: 43f5afe1a1dd058a2564cd3b2f330fc2a401f607
This commit is contained in:
parent
0d9e08cf3a
commit
a52faa7892
4
tools/cache/controller.go
vendored
4
tools/cache/controller.go
vendored
@ -72,6 +72,9 @@ type Config struct {
|
||||
|
||||
// Called whenever the ListAndWatch drops the connection with an error.
|
||||
WatchErrorHandler WatchErrorHandler
|
||||
|
||||
// WatchListPageSize is the requested chunk size of initial and relist watch lists.
|
||||
WatchListPageSize int64
|
||||
}
|
||||
|
||||
// ShouldResyncFunc is a type of function that indicates if a reflector should perform a
|
||||
@ -134,6 +137,7 @@ func (c *controller) Run(stopCh <-chan struct{}) {
|
||||
c.config.FullResyncPeriod,
|
||||
)
|
||||
r.ShouldResync = c.config.ShouldResync
|
||||
r.WatchListPageSize = c.config.WatchListPageSize
|
||||
r.clock = c.clock
|
||||
if c.config.WatchErrorHandler != nil {
|
||||
r.watchErrorHandler = c.config.WatchErrorHandler
|
||||
|
Loading…
Reference in New Issue
Block a user