- class hurricane.webhooks.base.Webhook(code=None)
Base class for webhooks in the registry. Run function initiates sending of webhook to the specified url.
- classmethod get_from_registry()
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)
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)
- class hurricane.webhooks.registry.WebhookRegistry
Registering webhooks and storing them in a webhooks dictionary.
- class hurricane.webhooks.webhook_types.LivenessWebhook
- class hurricane.webhooks.webhook_types.ReadinessWebhook
- class hurricane.webhooks.webhook_types.StartupWebhook
- exception hurricane.webhooks.exceptions.WebhookCodeAlreadyRegistered
Exception class for the case, that metric was already registered and should not be registered twice.