mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-01 07:07:15 +00:00
Utilize reflectorMutex in LastSyncResourceVersion
Kubernetes-commit: 4f54538ae8ff7a4e6829bea1479194af87b7833c
This commit is contained in:
committed by
Kubernetes Publisher
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 {
|
func (c *controller) LastSyncResourceVersion() string {
|
||||||
|
c.reflectorMutex.RLock()
|
||||||
|
defer c.reflectorMutex.RUnlock()
|
||||||
if c.reflector == nil {
|
if c.reflector == nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user