nvflare.fuel.data_event.event_manager module

class EventManager(data_bus: DataBus)[source]

Bases: object

Class for managing events by interacting with a DataBus.

Parameters:

data_bus (DataBus) – An instance of the DataBus class used for event communication.

Initialize the EventManager with a DataBus instance.

Parameters:

data_bus (DataBus) – An instance of the DataBus class used for event communication.

fire_event(event_name: str, event_data: Any | None = None) None[source]

Fire an event by publishing it to the DataBus.

Parameters:
  • event_name (str) – The name of the event to be fired.

  • event_data (Any, optional) – Additional data associated with the event (default is None).