MCPcopy
hub / github.com/kubewall/kubewall / WaitForSync

Method WaitForSync

backend/handlers/base/informers.go:85–95  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

83}
84
85func (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
97func (h *BaseHandler) processListEvents(resourceName string) func() {
98 return func() {

Callers 15

NewEndpointsHandlerFunction · 0.80
NewServicesHandlerFunction · 0.80
NewIngressHandlerFunction · 0.80
NewDaemonSetsHandlerFunction · 0.80
NewCronJobsHandlerFunction · 0.80
NewSatefulSetHandlerFunction · 0.80
NewJobsHandlerFunction · 0.80
NewReplicaSetHandlerFunction · 0.80
NewDeploymentsHandlerFunction · 0.80
NewPodsHandlerFunction · 0.80
NewNamespacesHandlerFunction · 0.80
NewRolesHandlerFunction · 0.80

Calls 3

processListEventsMethod · 0.95
AddEventMethod · 0.80
EventProcessorMethod · 0.65

Tested by

no test coverage detected