algokit_subscriber.types.event_emitter
¶
Module Contents¶
Classes¶
A simple event emitter that allows for the registration of event listeners and the emission of events to those listeners. |
Data¶
A function that takes a SubscribedTransaction and the event name. |
API¶
- EventListener¶
None
A function that takes a SubscribedTransaction and the event name.
- class EventEmitter¶
A simple event emitter that allows for the registration of event listeners and the emission of events to those listeners.
Initialization
- emit(event_name: str, event: Any) None ¶
Emits an event to all listeners registered for the event name.
- on(
- event_name: str,
- listener: algokit_subscriber.types.event_emitter.EventListener,
Registers a listener for the given event name.
- once(
- event_name: str,
- listener: algokit_subscriber.types.event_emitter.EventListener,
Registers a listener for the given event name that will only be called once.
- remove_listener(
- event_name: str,
- listener: algokit_subscriber.types.event_emitter.EventListener,
Removes a listener for the given event name.
- off¶
None