Skip to content

Arbitrary event sources #755

@aerosouund

Description

@aerosouund

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions