class hurricane.webhooks.base.Webhook(code=None)[source]

Base class for webhooks in the registry. Run function initiates sending of webhook to the specified url.

classmethod get_from_registry()[source]

Getting webhook from registry using the code.

run(url: str, status: hurricane.webhooks.base.WebhookStatus, error_trace: Optional[str] = None, close_loop: bool = False, loop=None)[source]

Initiates the sending of webhook in an asynchronous manner. Also specifies the callback of the async process, which handles the feedback and either logs success or failure of a webhook sending process.

url : Url, which webhook should be sent to status : can be either WebhookStatus.FAILED or WebhookStatus.SUCCEEDED depending on the success or failure of the process, which should be indicated by the webhook error_trace : specifies the error trace of the preceding failure close_loop : specifies, whether the main loop should be closed or be left running

class hurricane.webhooks.base.WebhookStatus(value)[source]

An enumeration.


class hurricane.webhooks.registry.WebhookRegistry[source]

Registering webhooks and storing them in a webhooks dictionary.


class hurricane.webhooks.webhook_types.LivenessWebhook[source]
class hurricane.webhooks.webhook_types.ReadinessWebhook[source]
class hurricane.webhooks.webhook_types.StartupWebhook[source]


exception hurricane.webhooks.exceptions.WebhookCodeAlreadyRegistered[source]

Exception class for the case, that metric was already registered and should not be registered twice.