mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
fix: shared informer typos
This commit is contained in:
parent
e9a3d99f37
commit
b38bfaa2ac
@ -735,7 +735,7 @@ func (s *sharedIndexInformer) HandleDeltas(obj interface{}, isInInitialList bool
|
|||||||
// Conforms to ResourceEventHandler
|
// Conforms to ResourceEventHandler
|
||||||
func (s *sharedIndexInformer) OnAdd(obj interface{}, isInInitialList bool) {
|
func (s *sharedIndexInformer) OnAdd(obj interface{}, isInInitialList bool) {
|
||||||
// Invocation of this function is locked under s.blockDeltas, so it is
|
// Invocation of this function is locked under s.blockDeltas, so it is
|
||||||
// save to distribute the notification
|
// safe to distribute the notification
|
||||||
s.cacheMutationDetector.AddObject(obj)
|
s.cacheMutationDetector.AddObject(obj)
|
||||||
s.processor.distribute(addNotification{newObj: obj, isInInitialList: isInInitialList}, false)
|
s.processor.distribute(addNotification{newObj: obj, isInInitialList: isInInitialList}, false)
|
||||||
}
|
}
|
||||||
@ -757,7 +757,7 @@ func (s *sharedIndexInformer) OnUpdate(old, new interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Invocation of this function is locked under s.blockDeltas, so it is
|
// Invocation of this function is locked under s.blockDeltas, so it is
|
||||||
// save to distribute the notification
|
// safe to distribute the notification
|
||||||
s.cacheMutationDetector.AddObject(new)
|
s.cacheMutationDetector.AddObject(new)
|
||||||
s.processor.distribute(updateNotification{oldObj: old, newObj: new}, isSync)
|
s.processor.distribute(updateNotification{oldObj: old, newObj: new}, isSync)
|
||||||
}
|
}
|
||||||
@ -765,7 +765,7 @@ func (s *sharedIndexInformer) OnUpdate(old, new interface{}) {
|
|||||||
// Conforms to ResourceEventHandler
|
// Conforms to ResourceEventHandler
|
||||||
func (s *sharedIndexInformer) OnDelete(old interface{}) {
|
func (s *sharedIndexInformer) OnDelete(old interface{}) {
|
||||||
// Invocation of this function is locked under s.blockDeltas, so it is
|
// Invocation of this function is locked under s.blockDeltas, so it is
|
||||||
// save to distribute the notification
|
// safe to distribute the notification
|
||||||
s.processor.distribute(deleteNotification{oldObj: old}, false)
|
s.processor.distribute(deleteNotification{oldObj: old}, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1088,7 +1088,7 @@ func (p *processorListener) run() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// shouldResync deterimines if the listener needs a resync. If the listener's resyncPeriod is 0,
|
// shouldResync determines if the listener needs a resync. If the listener's resyncPeriod is 0,
|
||||||
// this always returns false.
|
// this always returns false.
|
||||||
func (p *processorListener) shouldResync(now time.Time) bool {
|
func (p *processorListener) shouldResync(now time.Time) bool {
|
||||||
p.resyncLock.Lock()
|
p.resyncLock.Lock()
|
||||||
|
Loading…
Reference in New Issue
Block a user