Browse Source

add interface assertions for all clients

pull/1780/head
Anton Kaliaev 7 years ago
parent
commit
f6a79dd7c5
No known key found for this signature in database GPG Key ID: 7B6881D965918214
3 changed files with 6 additions and 0 deletions
  1. +2
    -0
      client/grpc_client.go
  2. +2
    -0
      client/local_client.go
  3. +2
    -0
      client/socket_client.go

+ 2
- 0
client/grpc_client.go View File

@ -13,6 +13,8 @@ import (
cmn "github.com/tendermint/tmlibs/common"
)
var _ Client = (*grpcClient)(nil)
// A stripped copy of the remoteClient that makes
// synchronous calls using grpc
type grpcClient struct {


+ 2
- 0
client/local_client.go View File

@ -7,6 +7,8 @@ import (
cmn "github.com/tendermint/tmlibs/common"
)
var _ Client = (*localClient)(nil)
type localClient struct {
cmn.BaseService
mtx *sync.Mutex


+ 2
- 0
client/socket_client.go View File

@ -23,6 +23,8 @@ const reqQueueSize = 256 // TODO make configurable
// const maxResponseSize = 1048576 // 1MB TODO make configurable
const flushThrottleMS = 20 // Don't wait longer than...
var _ Client = (*socketClient)(nil)
// This is goroutine-safe, but users should beware that
// the application in general is not meant to be interfaced
// with concurrent callers.


Loading…
Cancel
Save