mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-30 21:51:14 +00:00
Utilize reflectorMutex in LastSyncResourceVersion
Kubernetes-commit: 4f54538ae8ff7a4e6829bea1479194af87b7833c
This commit is contained in:
parent
cc5a7c7149
commit
541253da74
2
tools/cache/controller.go
vendored
2
tools/cache/controller.go
vendored
@ -131,6 +131,8 @@ func (c *controller) HasSynced() bool {
|
||||
}
|
||||
|
||||
func (c *controller) LastSyncResourceVersion() string {
|
||||
c.reflectorMutex.RLock()
|
||||
defer c.reflectorMutex.RUnlock()
|
||||
if c.reflector == nil {
|
||||
return ""
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user