add comments for cpm

This commit is contained in:
jasonjung
2022-11-12 13:39:16 -08:00
parent 2f959a773c
commit cc6c049522
2 changed files with 4 additions and 0 deletions

View File

@@ -93,6 +93,7 @@ func (p *Plugin) runRules() {
glog.V(3).Info("Start to run custom plugins")
for _, rule := range p.config.Rules {
// syncChan limits concurrent goroutines to configured PluginGlobalConfig.Concurrency value
p.syncChan <- struct{}{}
p.Add(1)
go func(rule *cpmtypes.CustomRule) {
@@ -116,6 +117,7 @@ func (p *Plugin) runRules() {
Message: message,
}
// pipes result into resultChan which customPluginMonitor instance generates status from
p.resultChan <- result
// Let the result be logged at a higher verbosity level. If there is a change in status it is logged later.