Crate exar_net [] [src]

Exar DB's TCP protocol

This module defines the TCP protocol used by Exar DB.

Protocol messages

The protocol is text-based and uses line-separated messages, each message consists of tab-separated values.

Connect

Message used to initialize a connection to Exar DB.

Connect    collection    [username]    [password]

Connected

Message used to acknowledge a successful connection.

Connected

Publish

Message used to publish an event into a collection.

It can be used only after a successful connection has been established.

Publish    tag1 tag2    timestamp    event_data

Published

Message used to acknowledge a successfully published event.

Published    event_id

Subscribe

Message used to subscribe to an event stream.

It can be used only after a successful connection has been established.

Subscribe    live    offset    limit    [tag1]

Subscribed

Message used to acknowledge a successful subscription.

Subscribed

Event

Message containing an event.

It is received after a successful subscription.

Event    event_id    tag1 tag2    timestamp    event_data

EndOfEventStream

Message signaling the end of an event stream.

It is received after a Subscribed or a list of Events.

EndOfEventStream

Error

Message containing an error.

It can be received after a Connect, Publish, Subscribe, or during an event stream.

Error    type    [subtype]    description

Structs

TcpMessageStream

A bidiectional TCP message stream.

TcpMessages

An iterator over the messages received on a stream.

Enums

TcpMessage

A list specifying categories of TCP message.

Traits

TryClone