Skip to content

RPC v0.2.0

Compare
Choose a tag to compare
@tchap tchap released this 07 Jul 14:03
· 37 commits to master since this release

Summary

This release includes multiple breaking changes. Basically the whole package was heavily refactored.

The major changes are following:

  • The way the RPC client is created is different now. You don't pass a URL into the constructor, but rather a transport implementation that is then used by the client internally.
  • Since there are multiple APIs exposed via the RPC endpoint, the database api, that is the only API supported so far, is not accessible on the client object itself any more, you need to use client.Database, i.e client.Database.GetConfig() instead of client.GetConfig().
  • The WebSocket transport now supports auto-reconnect mode. When enabled, the transport will try to reconnect automatically when the connection is not there yet or it is lost. The transport is also emitting events so that it is possible to see whether the underlying connection is established or not.
  • It is also possible to set WebSocket connection read and write timeouts.

Most of the changes are visible in examples/voting_monitor, except connection deadlines.