1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-14 11:57:32 +00:00
policy-reporter/pkg/report/client.go
Frank Jogeleit 72abc63ce0
External SQL DB support (#304)
* Support external Databases

Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
2023-05-02 11:00:14 +02:00

23 lines
792 B
Go

package report
import (
"github.com/kyverno/policy-reporter/pkg/crd/api/policyreport/v1alpha2"
)
// PolicyReportListener is called whenever a new PolicyReport comes in
type PolicyReportListener = func(LifecycleEvent)
// PolicyReportResultListener is called whenever a new PolicyResult comes in
type PolicyReportResultListener = func(v1alpha2.ReportInterface, v1alpha2.PolicyReportResult, bool)
// PolicyReportClient watches for PolicyReport Events and executes registered callback
type PolicyReportClient interface {
// Run starts the informer and workerqueue
Run(worker int, stopper chan struct{}) error
// Sync Report Informer and start watching for events
Sync(stopper chan struct{}) error
// HasSynced the configured PolicyReport
HasSynced() bool
// Stop the client
Stop()
}