Skip to main content

Create Stream Workers

This page explains how to create stream workers in Macrometa, assuming you have the stream worker definition written already. To learn more about writing stream workers, refer to Stream Worker Basics or look at Stream Worker Examples.

After you create the stream worker, it is saved in an inactive, unpublished state. For instructions on how to publish (activate) it, refer to Publish/Unpublish Stream Workers.

Follow these instructions to create a new stream worker using the GDN console web UI.

  1. Log in to your Macrometa account.

  2. Click Compute > Stream Workers.

  3. If you already have a stream worker written, then paste the code in the Editor tab and skip the following substeps. Otherwise, click New Stream Worker.

    1. In the Name field, enter a name for your stream worker. No spaces or special characters are allowed except hyphens (-) and underscores (_). Best practice is not write a name that describes what the stream worker does.

    2. (Optional) Enter a description. Best practice is to include a description so that other users (or future you) understand what the stream worker is for.

    3. Click Create.

      Macrometa creates metadata with the information that you entered.

  4. Enter the rest of your stream worker code.

  5. (Optional) Click Validate.

    Macrometa validates your stream worker code and displays an error if it is invalid.

  6. Click Save.

  7. Select edge locations to which your stream worker will be deployed and then click Save.

    Your stream worker is now created in an unpublished state. To publish it, click Publish.