Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arbitrary event sources #755

Open
aerosouund opened this issue Feb 7, 2025 · 0 comments
Open

Arbitrary event sources #755

aerosouund opened this issue Feb 7, 2025 · 0 comments

Comments

@aerosouund
Copy link
Contributor

aerosouund commented Feb 7, 2025

Currently, events are being created by the policy report informer. which then sends them to the queue and then to the debouncer which then through its dependence on this interface

type EventPublisher interface {
	// RegisterListener register Handlers called on each PolicyReport Event
	RegisterListener(string, PolicyReportListener)
	// UnregisterListener removes an registered listener
	UnregisterListener(string)
	// GetListener returns a list of all registered Listeners
	GetListener() map[string]PolicyReportListener
	// Publish Process LifecycleEvent with all registered listeners
	Publish(event LifecycleEvent)
	// RegisterPostListener register Handlers called on each PolicyReport Event after all regular listeners are finished
	RegisterPostListener(string, PolicyReportListener)
	// UnregisterPostListener removes an registered post listener
	UnregisterPostListener(string)
}

Calls the Publish() method to actually send data to the targets. We can experiment with other sources (e.g apache kafka) adding items to the work queue of the policy reporter for them to be processed by processNextItem()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant