0.1.4 • Published 7 months ago

@outerbounds/events v0.1.4

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
7 months ago

Typescript package to publish Events to Outerbounds platform

Installation

npm -i @outerbounds/events

Usage example

Assuming you have a Flow that is triggerd on event like this

from metaflow import FlowSpec, step, current, trigger


@trigger(event='my_event')
class NodeSimpleTriggeredFlow(FlowSpec):
    @step
    def start(self):
        self.var_1 = ["h", "e", "l", "l"]

        self.next(self.b, foreach='var_1')

    @step
    def b(self):
        print("In B")
        self.next(self.join)

    @step
    def join(self, inputs):
        self.next(self.end)

    @step
    def end(self):
        print("In end")

if __name__ == "__main__":
    NodeSimpleTriggeredFlow()

You can trigger it using Typescript code below. This assumes you're using Service Principals for programmatic auth. You can get configString for the machine user from OBP UI.

import { ArgoEventTrigger } from "@outerbounds/events";

// Event name, must match what's in @trigger
let argoEvent = new ArgoEventTrigger("my_event");

// Make sure to initialize the library
await argoEvent.init({ configString: "awssm-arn:..." });

// Trigger the event
await argoEvent.trigger({ foo: "bar" });
0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.0.3

7 months ago