mirror of
https://github.com/kyverno/policy-reporter.git
synced 2024-12-15 17:50:58 +00:00
0de8e8bead
* Internal Rewrite Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
19 lines
635 B
Go
19 lines
635 B
Go
package report
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// 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(*Result, bool)
|
|
|
|
// PolicyReportClient watches for PolicyReport Events and executes registered callback
|
|
type PolicyReportClient interface {
|
|
// WatchPolicyReports starts to watch for PolicyReport LifecycleEvent events
|
|
WatchPolicyReports(ctx context.Context) <-chan LifecycleEvent
|
|
// GetFoundResources as Map of Names
|
|
GetFoundResources() map[string]string
|
|
}
|