Represents a hook in the system. A hook is an action triggered by an event, defined by a trigger and an action to be executed.

Constructors

Properties

Constructors

  • Creates an instance of the Hook class.

    Parameters

    • trigger: Trigger

      The trigger event for the hook.

    • action: AbstractAction

      The action to be executed when the hook is triggered.

    • max_retry: number = 3

      The maximum number of retries for the action if it fails. Defaults to 3.

    Returns Hook

Properties

The action to be executed when the hook is triggered.

max_retry: number

The maximum number of retries for the action if it fails.

trigger: Trigger

The trigger event that activates the hook (e.g., ON_FAILURE, ON_COMPLETION).