choice_multi

package
v0.0.0-...-94a9b73 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

README

Multi-Choice Sample

This sample demonstrates how to run multiple activities in parallel based on a dynamic input.

Steps to run this sample:

  1. You need a Temporal service running. See details in README.md
  2. Run the following command to start the worker
go run choice-multi/worker/main.go
  1. Run the following command to start the multi choice workflow
go run choice-multi/starter/main.go

Documentation

Index

Constants

View Source
const (
	OrderChoiceApple  = "apple"
	OrderChoiceBanana = "banana"
	OrderChoiceCherry = "cherry"
	OrderChoiceOrange = "orange"
)

Variables

This section is empty.

Functions

func MultiChoiceWorkflow

func MultiChoiceWorkflow(ctx workflow.Context) error

MultiChoiceWorkflow Workflow definition.

Types

type OrderActivities

type OrderActivities struct {
	OrderChoices []string
}

func (*OrderActivities) GetBasketOrder

func (a *OrderActivities) GetBasketOrder(ctx context.Context) ([]string, error)

func (*OrderActivities) GetOrder

func (a *OrderActivities) GetOrder() (string, error)

func (*OrderActivities) OrderApple

func (a *OrderActivities) OrderApple(choice string) error

func (*OrderActivities) OrderBanana

func (a *OrderActivities) OrderBanana(choice string) error

func (*OrderActivities) OrderCherry

func (a *OrderActivities) OrderCherry(choice string) error

func (*OrderActivities) OrderOrange

func (a *OrderActivities) OrderOrange(choice string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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