speakeasy 0.1.0

JSON-RPC 2.0 made easy!
Documentation

Completely generic request/response client built on tower::Service, futures::Stream and futures::Sink.

  1. Create a [Service] and [Task].
    • Connect them to each other over a [Stream]/[Sink], allowing you to configure your own e.g queue depth, MPSC etc.
    • Give the [Task] a [Stream]/[Sink] transport to own. This is typically a wrapper over e.g a websocket connection.
  2. You call the [Service] with a [Dialogue].
  3. The [Service] formats this into an [Ask] for the [Task].
  4. The [Task] assigns the request an identifier for correlation using an [IdFactory], and sends the pair to the transport.
  5. A response eventually arrives on the transport.
  6. The [Task] reacts to the response, resolving the Future returned in (1).

[Task]s also handle timeouts, and propogating errors from the transport.