Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xcraft-inc/xcraft-core-bus
Low level messages bus
https://github.com/xcraft-inc/xcraft-core-bus
bus xcraft
Last synced: 1 day ago
JSON representation
Low level messages bus
- Host: GitHub
- URL: https://github.com/xcraft-inc/xcraft-core-bus
- Owner: Xcraft-Inc
- Created: 2016-08-04T13:55:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-02T09:30:37.000Z (about 1 month ago)
- Last Synced: 2024-10-14T15:03:54.213Z (about 1 month ago)
- Topics: bus, xcraft
- Language: JavaScript
- Size: 274 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# xcraft-core-bus
Manage the command and events bus lifecycle and operations.
The command registry is populated on the bootstrap where a list of command
locations is passed. A step looks for all files (in the first directory
level and according to a pattern) and load the modules in order to found
the `xcraftCommands` property.If this property exists, then the commands are loaded in the registry. Note
that all files in the root path of all modules passed to the bus manager
are required. You must ensure that it's always safe to require any `.js`
files in the root directory of the modules.## Built'in commands
Some command handlers are registered separatly.
- `autoconnect`
- `disconnect`
- `shutdown`
- `error`
- `motd`Only the `shutdown` command is publicy exposed. It provides a way in order
to shutdown the server.## Commands
The modules are dynamically loaded on the bus. Some public commands are
available in order to control the lifecycle of all modules (excepted this
one of course).- `bus.module.load`
- `bus.module.unload`
- `bus.module.reload`
- `bus.module.watch`
- `bus.module.unwatch`