Crates.io | cord-client |
lib.rs | cord-client |
version | 0.3.2 |
source | src |
created_at | 2020-04-01 19:44:13.35126 |
updated_at | 2023-04-20 23:45:46.489666 |
description | The client-side user interfaces for the Cord Platform that publish and subscribe messages to the Broker. |
homepage | https://cord-proj.org |
repository | https://github.com/cord-proj/cord-client |
max_upload_size | |
id | 225316 |
size | 40,980 |
Cord is a data streaming platform for composing, aggregating and distributing arbitrary streams. The Client crate provides user interfaces for publishing and subscribing to Cord Brokers.
First, start a new Cord Broker:
Docker
$ docker run -d -p 7101:7101 --rm cordproj/cord-broker:0
Cargo
$ cargo install cord-broker
$ cord-broker &
Next, use the Client to interact with the Broker. You can implement Cord within your own project using the Client library, however the easiest way to get started is by using the Client CLI.
Subscribe to a namespace:
Docker
$ docker run --rm cordproj/cord-client:0 -a <broker_addr> sub /names
Cargo
$ cargo install cord-client
$ cord-client sub /namespaces
Publish to this namespace:
Docker
$ docker run -it --rm cordproj/cord-client:0 -a <broker_addr> pub /names
Start typing to create an event, then press enter to send it to the broker.
Use the format: NAMESPACE=VALUE
/names/first=Daz
Cargo
$ cord-client pub /names
Start typing to create an event, then press enter to send it to the broker.
Use the format: NAMESPACE=VALUE
/names/first=Daz