(ctx context.Context)
| 83 | } |
| 84 | |
| 85 | func (h *BaseHandler) WaitForSync(ctx context.Context) { |
| 86 | ctx, cancel := context.WithTimeout(ctx, 30*time.Second) |
| 87 | defer cancel() |
| 88 | |
| 89 | if !cache.WaitForCacheSync(ctx.Done(), h.Informer.HasSynced) { |
| 90 | log.Warn("failed to sync informer within timeout", "kind", h.Kind) |
| 91 | return |
| 92 | } |
| 93 | |
| 94 | h.Container.EventProcessor().AddEvent(h.Kind, h.processListEvents("")) |
| 95 | } |
| 96 | |
| 97 | func (h *BaseHandler) processListEvents(resourceName string) func() { |
| 98 | return func() { |
no test coverage detected