Event Generate
Introduction
Catalyst enables you to generate sample payloads from various event sources supported by Catalyst Event Listeners using the CLI.
There are two types of Catalyst event listeners: the Catalyst component event listener that listens for a specific event in a Catalyst component, and custom event listeners that listen for the invocation of a custom URL. In both cases, the associated Event function is triggered upon the event occurrence, and a stream of data from the event source is passed to it. You can learn more about this from the Event Listeners help page .
The catalyst event:generate command generates sample payloads for both component and custom event listeners in the CLI. You can specify the particular source and the action that you require the payload for. You can use the generated payload to test the Event functions in your project from the local environment.
In addition to Event functions, you can also generate sample payloads and test the Integration functions in your project. The catalyst event:generate:integ command enables you to select the integration service, component source, and handler to generate the payload for.
You can then launch a Node shell from the CLI to test and debug the Event or Integration function, by passing the generated sample payload data to the function.
-
Both event generation commands in the CLI only generate sample payloads to help you test functions in the local environment. These actions will not be reflected in the event listeners, functions, or any components that you have configured in your project or in the remote console. They will remain unaffected.
-
Integration Functions is currently not available to Catalyst users accessing from the EU, AU, IN, or CA data centers.
-
If you are a Visual Studio Code IDE user, you can install the Catalyst Tools extension, and perform CLI operations using your IDE in place of the CLI. Steps to debug Event, Cron, and Integration functions using Visual Studio Code IDE can be found here.
Last Updated 2024-01-30 12:47:28 +0530 +0530
Yes
No
Send your feedback to us