https://github.com/tendermint/tendermint
Revision 1995ef2572bbefaa3bede1cb49bdba4e53157c05 authored by M. J. Fromberger on 22 September 2021, 21:26:35 UTC, committed by GitHub on 22 September 2021, 21:26:35 UTC
* rpc: Strip down the base RPC client interface.

Prior to this change, the RPC client interface requires implementing the entire
Service interface, but most of the methods of Service are not needed by the
concrete clients. Dissociate the Client interface from the Service interface.

- Extract only those methods of Service that are necessary to make the existing
  clients work.

- Update the clients to combine Start/Onstart and Stop/OnStop. This does not
  change what the clients do to start or stop. Only the websocket clients make
  use of this functionality anyway.

  The websocket implementation uses some plumbing from the BaseService helper.
  We should be able to excising that entirely, but the current interface
  dependencies among the clients would require a much larger change, and one
  that leaks into other (non-RPC) packages.

  As a less-invasive intermediate step, preserve the existing client behaviour
  (and tests) by extracting the necessary subset of the BaseService
  functionality to an analogous RunState helper for clients. I plan to obsolete
  that type in a future PR, but for now this makes a useful waypoint.

Related:
- Clean up client implementations.
- Update mocks.
1 parent d04b6c2
History
Tip revision: 1995ef2572bbefaa3bede1cb49bdba4e53157c05 authored by M. J. Fromberger on 22 September 2021, 21:26:35 UTC
rpc: Strip down the base RPC client interface. (#6971)
Tip revision: 1995ef2
File Mode Size
.github
DOCKER
abci
cmd
config
crypto
docs
internal
libs
light
networks
node
privval
proto
rpc
scripts
store
test
third_party
tools
types
version
.clang-format -rw-r--r-- 241 bytes
.dockerignore -rw-r--r-- 63 bytes
.editorconfig -rw-r--r-- 280 bytes
.gitignore -rw-r--r-- 683 bytes
.golangci.yml -rw-r--r-- 954 bytes
.goreleaser.yml -rw-r--r-- 634 bytes
.markdownlintignore -rw-r--r-- 89 bytes
CHANGELOG.md -rw-r--r-- 205.1 KB
CHANGELOG_PENDING.md -rw-r--r-- 484 bytes
CODE_OF_CONDUCT.md -rw-r--r-- 4.9 KB
CONTRIBUTING.md -rw-r--r-- 21.2 KB
LICENSE -rw-r--r-- 11.1 KB
Makefile -rw-r--r-- 10.8 KB
README.md -rw-r--r-- 7.9 KB
SECURITY.md -rw-r--r-- 7.7 KB
STYLE_GUIDE.md -rw-r--r-- 7.6 KB
UPGRADING.md -rw-r--r-- 36.1 KB
buf.gen.yaml -rw-r--r-- 480 bytes
buf.yaml -rw-r--r-- 193 bytes
docker-compose.yml -rw-r--r-- 1.3 KB
dredd.yml -rw-r--r-- 700 bytes
go.mod -rw-r--r-- 1.7 KB
go.sum -rw-r--r-- 145.3 KB

README.md

back to top