1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-15 17:50:58 +00:00
policy-reporter/pkg/report/client.go
Frank Jogeleit 0de8e8bead
Internal Rewrite (#91)
* Internal Rewrite

Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
2021-12-13 16:02:40 +01:00

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
}