Crates.io | hive_pubsub |
lib.rs | hive_pubsub |
version | 0.5.0 |
source | src |
created_at | 2020-08-28 13:04:40.206683 |
updated_at | 2021-09-19 20:12:25.608306 |
description | Generic Pub/Sub library. |
homepage | |
repository | https://gitlab.insrt.uk/insert/hive |
max_upload_size | |
id | 281877 |
size | 68,555 |
Hive is a generic Pub/Sub library for Rust.
By default, Hive provides a very basic pub/sub system which you can integrate into something like a web socket server, this system is perfect for small-scale applications which only use one node.
It is important to note that Hive is not for everyone, all the data is returned through one callback which is intended to be piped into things such as websocket servers, mpsc channels, etc. (If you want this functionality, feel free to contact me and I'll put it higher on my priority list)
For an example on how to use the library, please see the documentation.
Hive is designed to be slotted into any server application to act as a middle-man between you and your clients, it will automatically distribute any notifications you give it to all relevant connected clients and other nodes.
Before testing, specify a MongoDB connection script in your .env
or just pass it into the environment.
MONGODB_URI=mongodb://
Then, run the following command to run all tests: (this will also show you all the output)
cargo test --features test -- --nocapture