Closed fanweixiao closed 7 months ago
yomo serve -c ../config.yaml
sfn-1-executor
This stateful serverless function will emit data every 2 seconds.
go run sfn-1-executor/main.go
sfn-2-sink
First one start with USERID=alice, this instance will consume the data with target property set to alice.
USERID=alice
target
alice
USERID=alice go run sfn-2-sink/main.go
Second one start with USERID=bob, this instance will consume the data with target property set to bob.
USERID=bob
bob
USERID=bob go run sfn-2-sink/main.go
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Example 10: Target property and Cron feature
Steps to run the example
1. Start Zipper Server
2. Start
sfn-1-executor
This stateful serverless function will emit data every 2 seconds.
3. Start two instances of
sfn-2-sink
to consume the dataFirst one start with
USERID=alice
, this instance will consume the data withtarget
property set toalice
.Second one start with
USERID=bob
, this instance will consume the data withtarget
property set tobob
.