go-rpc -> tendermint/rpc
This commit is contained in:
parent
a70c95b79e
commit
9e82d132ce
|
@ -8,8 +8,8 @@ import (
|
||||||
|
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
. "github.com/tendermint/tmlibs/common"
|
. "github.com/tendermint/tmlibs/common"
|
||||||
"github.com/tendermint/go-rpc/client"
|
"github.com/tendermint/tendermint/rpc/client"
|
||||||
"github.com/tendermint/go-rpc/types"
|
"github.com/tendermint/tendermint/rpc/types"
|
||||||
"github.com/tendermint/go-wire"
|
"github.com/tendermint/go-wire"
|
||||||
_ "github.com/tendermint/tendermint/rpc/tendermint/core/types" // Register RPCResponse > Result types
|
_ "github.com/tendermint/tendermint/rpc/tendermint/core/types" // Register RPCResponse > Result types
|
||||||
)
|
)
|
||||||
|
|
|
@ -108,7 +108,7 @@ imports:
|
||||||
version: b5f314ffed65c81bd019ba1dd2bae0e95f3937f3
|
version: b5f314ffed65c81bd019ba1dd2bae0e95f3937f3
|
||||||
subpackages:
|
subpackages:
|
||||||
- upnp
|
- upnp
|
||||||
- name: github.com/tendermint/go-rpc
|
- name: github.com/tendermint/tendermint/rpc
|
||||||
version: 2c8df0ee6b60d8ac33662df13a4e358c679e02bf
|
version: 2c8df0ee6b60d8ac33662df13a4e358c679e02bf
|
||||||
subpackages:
|
subpackages:
|
||||||
- client
|
- client
|
||||||
|
|
|
@ -22,7 +22,7 @@ import:
|
||||||
version: develop
|
version: develop
|
||||||
- package: github.com/tendermint/go-p2p
|
- package: github.com/tendermint/go-p2p
|
||||||
version: unstable
|
version: unstable
|
||||||
- package: github.com/tendermint/go-rpc
|
- package: github.com/tendermint/tendermint/rpc
|
||||||
version: develop
|
version: develop
|
||||||
- package: github.com/tendermint/go-wire
|
- package: github.com/tendermint/go-wire
|
||||||
version: develop
|
version: develop
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
crypto "github.com/tendermint/go-crypto"
|
crypto "github.com/tendermint/go-crypto"
|
||||||
dbm "github.com/tendermint/tmlibs/db"
|
dbm "github.com/tendermint/tmlibs/db"
|
||||||
p2p "github.com/tendermint/go-p2p"
|
p2p "github.com/tendermint/go-p2p"
|
||||||
rpc "github.com/tendermint/go-rpc"
|
rpc "github.com/tendermint/tendermint/rpc"
|
||||||
rpcserver "github.com/tendermint/go-rpc/server"
|
rpcserver "github.com/tendermint/tendermint/rpc/server"
|
||||||
wire "github.com/tendermint/go-wire"
|
wire "github.com/tendermint/go-wire"
|
||||||
bc "github.com/tendermint/tendermint/blockchain"
|
bc "github.com/tendermint/tendermint/blockchain"
|
||||||
"github.com/tendermint/tendermint/consensus"
|
"github.com/tendermint/tendermint/consensus"
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
FROM golang:latest
|
FROM golang:latest
|
||||||
|
|
||||||
RUN mkdir -p /go/src/github.com/tendermint/go-rpc
|
RUN mkdir -p /go/src/github.com/tendermint/tendermint/rpc
|
||||||
WORKDIR /go/src/github.com/tendermint/go-rpc
|
WORKDIR /go/src/github.com/tendermint/tendermint/rpc
|
||||||
|
|
||||||
COPY Makefile /go/src/github.com/tendermint/go-rpc/
|
COPY Makefile /go/src/github.com/tendermint/tendermint/rpc/
|
||||||
# COPY glide.yaml /go/src/github.com/tendermint/go-rpc/
|
# COPY glide.yaml /go/src/github.com/tendermint/tendermint/rpc/
|
||||||
# COPY glide.lock /go/src/github.com/tendermint/go-rpc/
|
# COPY glide.lock /go/src/github.com/tendermint/tendermint/rpc/
|
||||||
|
|
||||||
COPY . /go/src/github.com/tendermint/go-rpc
|
COPY . /go/src/github.com/tendermint/tendermint/rpc
|
||||||
|
|
||||||
RUN make get_deps
|
RUN make get_deps
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# go-rpc
|
# tendermint/rpc
|
||||||
|
|
||||||
[![CircleCI](https://circleci.com/gh/tendermint/go-rpc.svg?style=svg)](https://circleci.com/gh/tendermint/go-rpc)
|
[![CircleCI](https://circleci.com/gh/tendermint/tendermint/rpc.svg?style=svg)](https://circleci.com/gh/tendermint/tendermint/rpc)
|
||||||
|
|
||||||
HTTP RPC server supporting calls via uri params, jsonrpc, and jsonrpc over websockets
|
HTTP RPC server supporting calls via uri params, jsonrpc, and jsonrpc over websockets
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
types "github.com/tendermint/go-rpc/types"
|
types "github.com/tendermint/tendermint/rpc/types"
|
||||||
wire "github.com/tendermint/go-wire"
|
wire "github.com/tendermint/go-wire"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ func makeHTTPDialer(remoteAddr string) (string, func(string, string) (net.Conn,
|
||||||
parts := strings.SplitN(remoteAddr, "://", 2)
|
parts := strings.SplitN(remoteAddr, "://", 2)
|
||||||
var protocol, address string
|
var protocol, address string
|
||||||
if len(parts) != 2 {
|
if len(parts) != 2 {
|
||||||
log.Warn("WARNING (go-rpc): Please use fully formed listening addresses, including the tcp:// or unix:// prefix")
|
log.Warn("WARNING (tendermint/rpc): Please use fully formed listening addresses, including the tcp:// or unix:// prefix")
|
||||||
protocol = types.SocketType(remoteAddr)
|
protocol = types.SocketType(remoteAddr)
|
||||||
address = remoteAddr
|
address = remoteAddr
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
cmn "github.com/tendermint/tmlibs/common"
|
cmn "github.com/tendermint/tmlibs/common"
|
||||||
types "github.com/tendermint/go-rpc/types"
|
types "github.com/tendermint/tendermint/rpc/types"
|
||||||
wire "github.com/tendermint/go-wire"
|
wire "github.com/tendermint/go-wire"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,9 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
client "github.com/tendermint/go-rpc/client"
|
client "github.com/tendermint/tendermint/rpc/client"
|
||||||
server "github.com/tendermint/go-rpc/server"
|
server "github.com/tendermint/tendermint/rpc/server"
|
||||||
types "github.com/tendermint/go-rpc/types"
|
types "github.com/tendermint/tendermint/rpc/types"
|
||||||
wire "github.com/tendermint/go-wire"
|
wire "github.com/tendermint/go-wire"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@ import (
|
||||||
const (
|
const (
|
||||||
tcpAddr = "tcp://0.0.0.0:46657"
|
tcpAddr = "tcp://0.0.0.0:46657"
|
||||||
|
|
||||||
unixSocket = "/tmp/go-rpc.sock"
|
unixSocket = "/tmp/tendermint/rpc.sock"
|
||||||
unixAddr = "unix:///tmp/go-rpc.sock"
|
unixAddr = "unix:///tmp/tendermint/rpc.sock"
|
||||||
|
|
||||||
websocketEndpoint = "/websocket/endpoint"
|
websocketEndpoint = "/websocket/endpoint"
|
||||||
)
|
)
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
|
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
types "github.com/tendermint/go-rpc/types"
|
types "github.com/tendermint/tendermint/rpc/types"
|
||||||
wire "github.com/tendermint/go-wire"
|
wire "github.com/tendermint/go-wire"
|
||||||
cmn "github.com/tendermint/tmlibs/common"
|
cmn "github.com/tendermint/tmlibs/common"
|
||||||
events "github.com/tendermint/tmlibs/events"
|
events "github.com/tendermint/tmlibs/events"
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
types "github.com/tendermint/go-rpc/types"
|
types "github.com/tendermint/tendermint/rpc/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func StartHTTPServer(listenAddr string, handler http.Handler) (listener net.Listener, err error) {
|
func StartHTTPServer(listenAddr string, handler http.Handler) (listener net.Listener, err error) {
|
||||||
|
@ -20,7 +20,7 @@ func StartHTTPServer(listenAddr string, handler http.Handler) (listener net.List
|
||||||
var proto, addr string
|
var proto, addr string
|
||||||
parts := strings.SplitN(listenAddr, "://", 2)
|
parts := strings.SplitN(listenAddr, "://", 2)
|
||||||
if len(parts) != 2 {
|
if len(parts) != 2 {
|
||||||
log.Warn("WARNING (go-rpc): Please use fully formed listening addresses, including the tcp:// or unix:// prefix")
|
log.Warn("WARNING (tendermint/rpc): Please use fully formed listening addresses, including the tcp:// or unix:// prefix")
|
||||||
// we used to allow addrs without tcp/unix prefix by checking for a colon
|
// we used to allow addrs without tcp/unix prefix by checking for a colon
|
||||||
// TODO: Deprecate
|
// TODO: Deprecate
|
||||||
proto = types.SocketType(listenAddr)
|
proto = types.SocketType(listenAddr)
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
data "github.com/tendermint/go-wire/data"
|
data "github.com/tendermint/go-wire/data"
|
||||||
events "github.com/tendermint/tmlibs/events"
|
events "github.com/tendermint/tmlibs/events"
|
||||||
"github.com/tendermint/go-rpc/client"
|
"github.com/tendermint/tendermint/rpc/client"
|
||||||
wire "github.com/tendermint/go-wire"
|
wire "github.com/tendermint/go-wire"
|
||||||
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
|
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
|
||||||
"github.com/tendermint/tendermint/types"
|
"github.com/tendermint/tendermint/types"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package core
|
package core
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/tendermint/go-rpc/types"
|
"github.com/tendermint/tendermint/rpc/types"
|
||||||
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
|
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
|
||||||
"github.com/tendermint/tendermint/types"
|
"github.com/tendermint/tendermint/types"
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,8 +2,8 @@ package core
|
||||||
|
|
||||||
import (
|
import (
|
||||||
data "github.com/tendermint/go-wire/data"
|
data "github.com/tendermint/go-wire/data"
|
||||||
rpc "github.com/tendermint/go-rpc/server"
|
rpc "github.com/tendermint/tendermint/rpc/server"
|
||||||
"github.com/tendermint/go-rpc/types"
|
"github.com/tendermint/tendermint/rpc/types"
|
||||||
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
|
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
|
||||||
"github.com/tendermint/tendermint/types"
|
"github.com/tendermint/tendermint/types"
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"github.com/tendermint/go-crypto"
|
"github.com/tendermint/go-crypto"
|
||||||
data "github.com/tendermint/go-wire/data"
|
data "github.com/tendermint/go-wire/data"
|
||||||
"github.com/tendermint/go-p2p"
|
"github.com/tendermint/go-p2p"
|
||||||
"github.com/tendermint/go-rpc/types"
|
"github.com/tendermint/tendermint/rpc/types"
|
||||||
"github.com/tendermint/go-wire"
|
"github.com/tendermint/go-wire"
|
||||||
"github.com/tendermint/tendermint/types"
|
"github.com/tendermint/tendermint/types"
|
||||||
)
|
)
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
abci "github.com/tendermint/abci/types"
|
abci "github.com/tendermint/abci/types"
|
||||||
. "github.com/tendermint/tmlibs/common"
|
. "github.com/tendermint/tmlibs/common"
|
||||||
rpc "github.com/tendermint/go-rpc/client"
|
rpc "github.com/tendermint/tendermint/rpc/client"
|
||||||
"github.com/tendermint/tendermint/rpc/tendermint/core"
|
"github.com/tendermint/tendermint/rpc/tendermint/core"
|
||||||
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
|
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
|
||||||
"github.com/tendermint/tendermint/state/txindex/null"
|
"github.com/tendermint/tendermint/state/txindex/null"
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
|
|
||||||
abci "github.com/tendermint/abci/types"
|
abci "github.com/tendermint/abci/types"
|
||||||
cfg "github.com/tendermint/go-config"
|
cfg "github.com/tendermint/go-config"
|
||||||
client "github.com/tendermint/go-rpc/client"
|
client "github.com/tendermint/tendermint/rpc/client"
|
||||||
"github.com/tendermint/tendermint/config/tendermint_test"
|
"github.com/tendermint/tendermint/config/tendermint_test"
|
||||||
nm "github.com/tendermint/tendermint/node"
|
nm "github.com/tendermint/tendermint/node"
|
||||||
"github.com/tendermint/tendermint/proxy"
|
"github.com/tendermint/tendermint/proxy"
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
cmn "github.com/tendermint/tmlibs/common"
|
cmn "github.com/tendermint/tmlibs/common"
|
||||||
rpcserver "github.com/tendermint/go-rpc/server"
|
rpcserver "github.com/tendermint/tendermint/rpc/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
var routes = map[string]*rpcserver.RPCFunc{
|
var routes = map[string]*rpcserver.RPCFunc{
|
||||||
|
|
|
@ -15,7 +15,7 @@ fi
|
||||||
# some libs are tested with go, others with make
|
# some libs are tested with go, others with make
|
||||||
# TODO: should be all make (post repo merge)
|
# TODO: should be all make (post repo merge)
|
||||||
LIBS_GO_TEST=(tmlibs/clist tmlibs/common go-config go-crypto tmlibs/db tmlibs/events go-merkle go-p2p)
|
LIBS_GO_TEST=(tmlibs/clist tmlibs/common go-config go-crypto tmlibs/db tmlibs/events go-merkle go-p2p)
|
||||||
LIBS_MAKE_TEST=(go-rpc go-wire abci)
|
LIBS_MAKE_TEST=(tendermint/rpc go-wire abci)
|
||||||
|
|
||||||
for lib in "${LIBS_GO_TEST[@]}"; do
|
for lib in "${LIBS_GO_TEST[@]}"; do
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue