Total Complexity | 1 |
Total Lines | 10 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """Utility functions.""" |
||
2 | from kytos.core.events import KytosEvent |
||
3 | |||
4 | |||
5 | def emit_event(controller, name, **kwargs): |
||
6 | """Send an event when something happens with an EVC.""" |
||
7 | event_name = f'kytos/mef_eline.{name}' |
||
8 | event = KytosEvent(name=event_name, content=kwargs) |
||
9 | controller.buffers.app.put(event) |
||
10 |