mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-15 22:31:21 +00:00
add interface assertions for all clients
This commit is contained in:
@ -13,6 +13,8 @@ import (
|
|||||||
cmn "github.com/tendermint/tmlibs/common"
|
cmn "github.com/tendermint/tmlibs/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var _ Client = (*grpcClient)(nil)
|
||||||
|
|
||||||
// A stripped copy of the remoteClient that makes
|
// A stripped copy of the remoteClient that makes
|
||||||
// synchronous calls using grpc
|
// synchronous calls using grpc
|
||||||
type grpcClient struct {
|
type grpcClient struct {
|
||||||
|
@ -7,6 +7,8 @@ import (
|
|||||||
cmn "github.com/tendermint/tmlibs/common"
|
cmn "github.com/tendermint/tmlibs/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var _ Client = (*localClient)(nil)
|
||||||
|
|
||||||
type localClient struct {
|
type localClient struct {
|
||||||
cmn.BaseService
|
cmn.BaseService
|
||||||
mtx *sync.Mutex
|
mtx *sync.Mutex
|
||||||
|
@ -23,6 +23,8 @@ const reqQueueSize = 256 // TODO make configurable
|
|||||||
// const maxResponseSize = 1048576 // 1MB TODO make configurable
|
// const maxResponseSize = 1048576 // 1MB TODO make configurable
|
||||||
const flushThrottleMS = 20 // Don't wait longer than...
|
const flushThrottleMS = 20 // Don't wait longer than...
|
||||||
|
|
||||||
|
var _ Client = (*socketClient)(nil)
|
||||||
|
|
||||||
// This is goroutine-safe, but users should beware that
|
// This is goroutine-safe, but users should beware that
|
||||||
// the application in general is not meant to be interfaced
|
// the application in general is not meant to be interfaced
|
||||||
// with concurrent callers.
|
// with concurrent callers.
|
||||||
|
Reference in New Issue
Block a user