move RPCClient interface to sdk

This commit is contained in:
Andrea Franz 2018-05-04 16:12:36 +02:00
parent 3cd0e1594a
commit 037cb0792c
No known key found for this signature in database
GPG Key ID: 4F0D2F2D9DE7F29D
2 changed files with 5 additions and 17 deletions

View File

@ -1,17 +0,0 @@
package sdk
import "github.com/valyala/gorpc"
// RPCClient is a client to manage all rpc calls
type RPCClient interface {
Call(request interface{}) (response interface{}, err error)
}
func newRPC(address string) RPCClient {
rpc := &gorpc.Client{
Addr: address, // "rpc.server.addr:12345",
}
rpc.Start()
return rpc
}

5
sdk.go
View File

@ -6,6 +6,11 @@ import (
"log"
)
// RPCClient is a client to manage all rpc calls
type RPCClient interface {
Call(request interface{}) (response interface{}, err error)
}
// SDK is a set of tools to interact with status node
type SDK struct {
RPCClient RPCClient