[][src]Crate cord_client

Cord is a data streaming platform for composing, aggregating and distributing arbitrary streams. It uses a publish-subscribe model that allows multiple publishers to share their streams via a Cord Broker. Subscribers can then compose custom sinks using a regex-like pattern to access realtime data based on their individual requirements.

To interact with a Broker, we use this library:

Examples

use cord_client::Client;

let mut conn = Client::connect("127.0.0.1:7101".parse().unwrap()).await?;

// Tell the broker we're going to provide the namespace /users
conn.provide("/users".into()).await?;

// Start publishing events...
conn.event("/users/mark".into(), "Mark has joined").await?;

Cord CLI

For one-off interactions with a Broker, there is also the Cord CLI, which is available via Cargo:

$ cargo install cord-client
$ cord-client sub /namespaces

For more usage, check the usage guidelines on cord-proj.org.

Modules

errors

Structs

ClientConn

The ClientConn manages the connection between you and a Cord Broker.

Subscriber

A Subscriber encapsulates a stream of events for a subscribed namespace. It is created by Client::subscribe().

Type Definitions

Client

The Client type alias defines the Sink type for communicating with a Broker.