mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 12:25:53 +02:00
decouple bouncer dependencies: use go-cs-lib/pkg/* (#2216)
* decouple bouncer dependencies: use go-cs-lib/pkg/trace * decouple bouncer dependencies: use go-cs-lib/pkg/version * decouple bouncer dependencies: use go-cs-lib/pkg/yamlpatch * decouple bouncer dependencies: use go-cs-lib/pkg/csstring * unused import
This commit is contained in:
parent
eddb994c0b
commit
534328ca30
59 changed files with 191 additions and 1297 deletions
|
@ -8,6 +8,8 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/crowdsecurity/go-cs-lib/pkg/trace"
|
||||
|
||||
"github.com/crowdsecurity/crowdsec/pkg/apiclient"
|
||||
"github.com/crowdsecurity/crowdsec/pkg/csconfig"
|
||||
"github.com/crowdsecurity/crowdsec/pkg/database"
|
||||
|
@ -217,8 +219,7 @@ func (p *Papi) PullOnce(since time.Time, sync bool) error {
|
|||
|
||||
// PullPAPI is the long polling client for real-time decisions from PAPI
|
||||
func (p *Papi) Pull() error {
|
||||
|
||||
defer types.CatchPanic("lapi/PullPAPI")
|
||||
defer trace.CatchPanic("lapi/PullPAPI")
|
||||
p.Logger.Infof("Starting Polling API Pull")
|
||||
|
||||
lastTimestamp := time.Time{}
|
||||
|
@ -270,7 +271,7 @@ func (p *Papi) Pull() error {
|
|||
}
|
||||
|
||||
func (p *Papi) SyncDecisions() error {
|
||||
defer types.CatchPanic("lapi/syncDecisionsToCAPI")
|
||||
defer trace.CatchPanic("lapi/syncDecisionsToCAPI")
|
||||
|
||||
var cache models.DecisionsDeleteRequest
|
||||
ticker := time.NewTicker(p.SyncInterval)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue