From ef4bf6a8ab08dbfd0ef0b061a8592e9717c24e5c Mon Sep 17 00:00:00 2001 From: mmetc <92726601+mmetc@users.noreply.github.com> Date: Mon, 14 Feb 2022 13:47:15 +0100 Subject: [PATCH] grammar (#1257) --- cmd/crowdsec-cli/decisions.go | 2 +- cmd/crowdsec/crowdsec.go | 11 ++++++----- cmd/crowdsec/main.go | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cmd/crowdsec-cli/decisions.go b/cmd/crowdsec-cli/decisions.go index 851db9d06..d44b929f2 100644 --- a/cmd/crowdsec-cli/decisions.go +++ b/cmd/crowdsec-cli/decisions.go @@ -192,7 +192,7 @@ cscli decisions list -t ban if NoSimu != nil && *NoSimu { filter.IncludeSimulated = new(bool) } - /*nulify the empty entries to avoid bad filter*/ + /* nullify the empty entries to avoid bad filter */ if *filter.Until == "" { filter.Until = nil } else { diff --git a/cmd/crowdsec/crowdsec.go b/cmd/crowdsec/crowdsec.go index 89af7b8cb..433f453c4 100644 --- a/cmd/crowdsec/crowdsec.go +++ b/cmd/crowdsec/crowdsec.go @@ -231,15 +231,16 @@ func waitOnTomb() { log.Warningf("Acquisition is finished, shutting down") /* While it might make sense to want to shut-down parser/buckets/etc. as soon as acquisition is finished, - we might have some pending buckets : buckets that overflowed, but which LeakRoutine are still alive because they - are waiting to be able to "commit" (push to api). This can happens specifically in a context where a lot of logs + we might have some pending buckets: buckets that overflowed, but whose LeakRoutine are still alive because they + are waiting to be able to "commit" (push to api). This can happen specifically in a context where a lot of logs are going to trigger overflow (ie. trigger buckets with ~100% of the logs triggering an overflow). To avoid this (which would mean that we would "lose" some overflows), let's monitor the number of live buckets. - However, because of the blackhole mechanism, you can't really wait for the number of LeakRoutine to go to zero (we might have to wait $blackhole_duration). + However, because of the blackhole mechanism, we can't really wait for the number of LeakRoutine to go to zero + (we might have to wait $blackhole_duration). - So : we are waiting for the number of buckets to stop decreasing before returning. "how long" we should wait is a bit of the trick question, - as some operations (ie. reverse dns or such in post-overflow) can take some time :) + So: we are waiting for the number of buckets to stop decreasing before returning. "how long" we should wait + is a bit of the trick question, as some operations (ie. reverse dns or such in post-overflow) can take some time :) */ return diff --git a/cmd/crowdsec/main.go b/cmd/crowdsec/main.go index 19924d10b..d8c68c0f3 100644 --- a/cmd/crowdsec/main.go +++ b/cmd/crowdsec/main.go @@ -192,7 +192,7 @@ func (f *Flags) Parse() { flag.Parse() } -// LoadConfig return configuration parsed from configuration file +// LoadConfig returns a configuration parsed from configuration file func LoadConfig(cConfig *csconfig.Config) error { if dumpFolder != "" {