-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactoring to TemplateUtils, adding WorkflowPersistence, cleanup++ * bump stated version * bump stated version with a bugfix * allow functions in testData, add test for change data callback and rate limit * add runaway example function * revert accidental README change, convert pubsub to SW theme * improve comments * removeDataChangeCallback before setting a new one * review feedback * feedback++ * feedback+++ * feedback++++ --------- Co-authored-by: Sergey Sergeev <[email protected]>
- Loading branch information
1 parent
888a2a7
commit 8dc30c4
Showing
12 changed files
with
266 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Droid R2-D2 is sending messages to the Rebel Alliance's communication channel | ||
produceParams: | ||
type: "rebel-comm-channel" | ||
data: | | ||
${ | ||
function(){ | ||
{'message': 'Rebel Fleet Coordinates', 'location': $random()} | ||
} | ||
} | ||
client: | ||
type: test | ||
# Droid C-3PO will intercept and log each received message for the Rebel Alliance | ||
subscribeParams: #parameters for subscribing to a holocomm transmission | ||
source: cloudEvent | ||
type: /${ produceParams.type } # subscribe to the same channel as R2-D2 to intercept messages | ||
to: | | ||
/${ | ||
function($e){( | ||
$set('/interceptedMessages/-', $e); | ||
)} | ||
} | ||
subscriberId: protocolDroid | ||
initialPosition: latest | ||
client: | ||
type: test | ||
# Activates R2-D2's message transmission function every 50 milliseconds | ||
send: "${ $setInterval( function(){ $publish(produceParams)}, 50) }" | ||
# Activates C-3PO's message interception function | ||
recv$: $subscribe(subscribeParams) | ||
# interceptedMessages is where C-3PO will store the results of message decoding | ||
interceptedMessages: [ ] | ||
# This condition stops the operation when interceptedMessages has 10 elements | ||
stop$: ($count(interceptedMessages)>=10?($clearInterval(send);'missionAccomplished'):'operationOngoing') |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.