platypush/platypush/message/event/ngrok.py

42 lines
1.1 KiB
Python
Raw Normal View History

2021-09-25 01:34:45 +02:00
from platypush.message.event import Event
class NgrokEvent(Event):
"""
``ngrok`` base event.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
2021-10-01 23:39:07 +02:00
class NgrokProcessStartedEvent(NgrokEvent):
2021-09-25 01:34:45 +02:00
"""
Event triggered when the ``ngrok`` process is started.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
2021-10-01 23:39:07 +02:00
class NgrokTunnelStartedEvent(NgrokEvent):
2021-09-25 01:34:45 +02:00
"""
Event triggered when a tunnel is started.
"""
def __init__(self, *args, name: str, url: str, protocol: str, **kwargs):
super().__init__(*args, name=name, url=url, protocol=protocol, **kwargs)
2021-10-01 23:39:07 +02:00
class NgrokTunnelStoppedEvent(NgrokEvent):
2021-09-25 01:34:45 +02:00
"""
Event triggered when a tunnel is stopped.
"""
def __init__(self, *args, name: str, url: str, protocol: str, **kwargs):
super().__init__(*args, name=name, url=url, protocol=protocol, **kwargs)
2021-10-01 23:39:07 +02:00
class NgrokProcessStoppedEvent(NgrokEvent):
2021-09-25 01:34:45 +02:00
"""
Event triggered when the ngrok process is stopped.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)