Last active
August 21, 2016 15:27
-
-
Save smetj/c8821f9b1a1303b00663e84be63281ec to your computer and use it in GitHub Desktop.
Hello world (wishbone.readthedocs.org)
This file contains hidden or 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
from wishbone.module.testevent import TestEvent | |
from wishbone.module.stdout import STDOUT | |
from wishbone.router import Default | |
from wishbone.actor import ActorConfig | |
input_config = ActorConfig("input") | |
output_config = ActorConfig("output") | |
router = Default() | |
router.registerModule(TestEvent, input_config, {"message": "Hello world!"}) | |
router.registerModule(STDOUT, output_config) | |
router.connectQueue("input.outbox", "output.inbox") | |
router.start() | |
try: | |
router.block() | |
except KeyboardInterrupt: | |
router.stop() |
This file contains hidden or 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
modules: | |
input: | |
module: wishbone.input.testevent | |
arguments: | |
message : Hello World! | |
stdout: | |
module: wishbone.output.stdout | |
routingtable: | |
- input.outbox -> stdout.inbox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment