Skip to content

Commit 3445475

Browse files
committed
MINOR: add event processed channel to monitoring
1 parent 0f295d1 commit 3445475

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pkg/controller/monitor.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ func (c *HAProxyController) SyncData() {
7575
change = c.store.EventPublishService(ns, job.Data.(*store.Service))
7676
}
7777
hadChanges = hadChanges || change
78+
if job.EventProcessed != nil {
79+
close(job.EventProcessed)
80+
}
81+
7882
}
7983
}
8084

pkg/k8s/types.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ type SyncType string
77
type SyncDataEvent struct {
88
_ [0]int
99
SyncType
10-
Namespace string
11-
Name string
12-
Data interface{}
10+
Namespace string
11+
Name string
12+
Data interface{}
13+
EventProcessed chan struct{}
1314
}
1415

1516
//nolint:golint,stylecheck

0 commit comments

Comments
 (0)