-
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.
* wip * WIP * all tests pass --------- Co-authored-by: Geoffrey Hendrey <[email protected]>
- Loading branch information
1 parent
ecb530b
commit be685e7
Showing
9 changed files
with
117 additions
and
322 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
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 |
---|---|---|
@@ -1,23 +1,22 @@ | ||
# producer will be sending data function output to the "type" topic | ||
# producer will be sending some test data | ||
produceParams: | ||
type: "my-topic" | ||
data: "${ [1..5].({'name': 'nozzleTime', 'rando': $random()}) }" | ||
data: ['luke', 'han', 'leia'] | ||
client: | ||
type: test | ||
# producer will be invoking "to" function for each consumed event | ||
subscribeParams: #parameters for subscribing to a cloud event | ||
# the subscriber's 'to' function will be called on each received event | ||
subscribeParams: #parameters for subscribing to an event | ||
source: cloudEvent | ||
type: /${ produceParams.type } # subscribe to the same topic as we are publishing to test events | ||
to: /${ function($e){( | ||
$set('/rxLog', rxLog~>$append($e)); | ||
)} } | ||
subscriberId: dingus | ||
to: /${joinResistance} | ||
subscriberId: rebelArmy | ||
initialPosition: latest | ||
client: | ||
type: test | ||
joinResistance: /${ function($rebel){ $set('/rebelForces', rebelForces~>$append($rebel))} } | ||
# starts producer function | ||
send$: $publish(produceParams) | ||
# starts consumer function | ||
recv$: $subscribe(subscribeParams) | ||
# rxLog is a field of the template where the consumer function will be storing results of event processing | ||
rxLog: [ ] | ||
# the subscriber's `to` function will write the received data here | ||
rebelForces: [ ] |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.