externalevent

package
v0.0.0-...-0f879ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

External Event

This is a simple example of a workflow that waits for an ExternalEvent.

Start the Task Worker

We have two TaskDef's and thus two Task Functions. Note that worker/main.go kicks off two threads, one for each Task Worker.

go run ./externalevent/worker

Register the WfSpec

In another terminal, run:

go run ./externalevent/deploy

Run a WfRun

Let's run the WfRun:

lhctl run external-event

Note the wfRunId. Let's check on it:

lhctl get wfRun <wfRunId>

The status should be RUNNING. That's because it's waiting for us to send the event.

lhctl postEvent <wfRunId> my-name STR obi-wan

That sends the ExternalEvent to the WfRun. We can view the status and see that the workflow completed:

lhctl get wfRun <wfRunId>

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskForName

func AskForName() string

func ExternalEventWorkflow

func ExternalEventWorkflow(thread *wflib.ThreadBuilder)

func SpecificGreeting

func SpecificGreeting(name string) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL