Skip to content

Commit b38bfaa

Browse files
committed
fix: shared informer typos
1 parent e9a3d99 commit b38bfaa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

staging/src/k8s.io/client-go/tools/cache/shared_informer.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ func (s *sharedIndexInformer) HandleDeltas(obj interface{}, isInInitialList bool
735735
// Conforms to ResourceEventHandler
736736
func (s *sharedIndexInformer) OnAdd(obj interface{}, isInInitialList bool) {
737737
// Invocation of this function is locked under s.blockDeltas, so it is
738-
// save to distribute the notification
738+
// safe to distribute the notification
739739
s.cacheMutationDetector.AddObject(obj)
740740
s.processor.distribute(addNotification{newObj: obj, isInInitialList: isInInitialList}, false)
741741
}
@@ -757,15 +757,15 @@ func (s *sharedIndexInformer) OnUpdate(old, new interface{}) {
757757
}
758758

759759
// Invocation of this function is locked under s.blockDeltas, so it is
760-
// save to distribute the notification
760+
// safe to distribute the notification
761761
s.cacheMutationDetector.AddObject(new)
762762
s.processor.distribute(updateNotification{oldObj: old, newObj: new}, isSync)
763763
}
764764

765765
// Conforms to ResourceEventHandler
766766
func (s *sharedIndexInformer) OnDelete(old interface{}) {
767767
// Invocation of this function is locked under s.blockDeltas, so it is
768-
// save to distribute the notification
768+
// safe to distribute the notification
769769
s.processor.distribute(deleteNotification{oldObj: old}, false)
770770
}
771771

@@ -1088,7 +1088,7 @@ func (p *processorListener) run() {
10881088
}
10891089
}
10901090

1091-
// shouldResync deterimines if the listener needs a resync. If the listener's resyncPeriod is 0,
1091+
// shouldResync determines if the listener needs a resync. If the listener's resyncPeriod is 0,
10921092
// this always returns false.
10931093
func (p *processorListener) shouldResync(now time.Time) bool {
10941094
p.resyncLock.Lock()

0 commit comments

Comments
 (0)