Browse Source

go-rpc -> tendermint/rpc

pull/456/head
Ethan Buchman 8 years ago
parent
commit
9e82d132ce
19 changed files with 34 additions and 34 deletions
  1. +2
    -2
      benchmarks/simu/counter.go
  2. +1
    -1
      glide.lock
  3. +1
    -1
      glide.yaml
  4. +2
    -2
      node/node.go
  5. +6
    -6
      rpc/Dockerfile
  6. +2
    -2
      rpc/README.md
  7. +2
    -2
      rpc/client/http_client.go
  8. +1
    -1
      rpc/client/ws_client.go
  9. +5
    -5
      rpc/rpc_test.go
  10. +1
    -1
      rpc/server/handlers.go
  11. +2
    -2
      rpc/server/http_server.go
  12. +1
    -1
      rpc/tendermint/client/httpclient.go
  13. +1
    -1
      rpc/tendermint/core/events.go
  14. +2
    -2
      rpc/tendermint/core/routes.go
  15. +1
    -1
      rpc/tendermint/core/types/responses.go
  16. +1
    -1
      rpc/tendermint/test/client_test.go
  17. +1
    -1
      rpc/tendermint/test/helpers.go
  18. +1
    -1
      rpc/test/main.go
  19. +1
    -1
      test/test_libs.sh

+ 2
- 2
benchmarks/simu/counter.go View File

@ -8,8 +8,8 @@ import (
"github.com/gorilla/websocket"
. "github.com/tendermint/tmlibs/common"
"github.com/tendermint/go-rpc/client"
"github.com/tendermint/go-rpc/types"
"github.com/tendermint/tendermint/rpc/client"
"github.com/tendermint/tendermint/rpc/types"
"github.com/tendermint/go-wire"
_ "github.com/tendermint/tendermint/rpc/tendermint/core/types" // Register RPCResponse > Result types
)


+ 1
- 1
glide.lock View File

@ -108,7 +108,7 @@ imports:
version: b5f314ffed65c81bd019ba1dd2bae0e95f3937f3
subpackages:
- upnp
- name: github.com/tendermint/go-rpc
- name: github.com/tendermint/tendermint/rpc
version: 2c8df0ee6b60d8ac33662df13a4e358c679e02bf
subpackages:
- client


+ 1
- 1
glide.yaml View File

@ -22,7 +22,7 @@ import:
version: develop
- package: github.com/tendermint/go-p2p
version: unstable
- package: github.com/tendermint/go-rpc
- package: github.com/tendermint/tendermint/rpc
version: develop
- package: github.com/tendermint/go-wire
version: develop


+ 2
- 2
node/node.go View File

@ -13,8 +13,8 @@ import (
crypto "github.com/tendermint/go-crypto"
dbm "github.com/tendermint/tmlibs/db"
p2p "github.com/tendermint/go-p2p"
rpc "github.com/tendermint/go-rpc"
rpcserver "github.com/tendermint/go-rpc/server"
rpc "github.com/tendermint/tendermint/rpc"
rpcserver "github.com/tendermint/tendermint/rpc/server"
wire "github.com/tendermint/go-wire"
bc "github.com/tendermint/tendermint/blockchain"
"github.com/tendermint/tendermint/consensus"


+ 6
- 6
rpc/Dockerfile View File

@ -1,12 +1,12 @@
FROM golang:latest
RUN mkdir -p /go/src/github.com/tendermint/go-rpc
WORKDIR /go/src/github.com/tendermint/go-rpc
RUN mkdir -p /go/src/github.com/tendermint/tendermint/rpc
WORKDIR /go/src/github.com/tendermint/tendermint/rpc
COPY Makefile /go/src/github.com/tendermint/go-rpc/
# COPY glide.yaml /go/src/github.com/tendermint/go-rpc/
# COPY glide.lock /go/src/github.com/tendermint/go-rpc/
COPY Makefile /go/src/github.com/tendermint/tendermint/rpc/
# COPY glide.yaml /go/src/github.com/tendermint/tendermint/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

+ 2
- 2
rpc/README.md View File

@ -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


+ 2
- 2
rpc/client/http_client.go View File

@ -12,7 +12,7 @@ import (
"strings"
"github.com/pkg/errors"
types "github.com/tendermint/go-rpc/types"
types "github.com/tendermint/tendermint/rpc/types"
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)
var protocol, address string
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)
address = remoteAddr
} else {


+ 1
- 1
rpc/client/ws_client.go View File

@ -9,7 +9,7 @@ import (
"github.com/gorilla/websocket"
"github.com/pkg/errors"
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"
)


+ 5
- 5
rpc/rpc_test.go View File

@ -12,9 +12,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
client "github.com/tendermint/go-rpc/client"
server "github.com/tendermint/go-rpc/server"
types "github.com/tendermint/go-rpc/types"
client "github.com/tendermint/tendermint/rpc/client"
server "github.com/tendermint/tendermint/rpc/server"
types "github.com/tendermint/tendermint/rpc/types"
wire "github.com/tendermint/go-wire"
)
@ -22,8 +22,8 @@ import (
const (
tcpAddr = "tcp://0.0.0.0:46657"
unixSocket = "/tmp/go-rpc.sock"
unixAddr = "unix:///tmp/go-rpc.sock"
unixSocket = "/tmp/tendermint/rpc.sock"
unixAddr = "unix:///tmp/tendermint/rpc.sock"
websocketEndpoint = "/websocket/endpoint"
)


+ 1
- 1
rpc/server/handlers.go View File

@ -14,7 +14,7 @@ import (
"github.com/gorilla/websocket"
"github.com/pkg/errors"
types "github.com/tendermint/go-rpc/types"
types "github.com/tendermint/tendermint/rpc/types"
wire "github.com/tendermint/go-wire"
cmn "github.com/tendermint/tmlibs/common"
events "github.com/tendermint/tmlibs/events"


+ 2
- 2
rpc/server/http_server.go View File

@ -12,7 +12,7 @@ import (
"time"
"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) {
@ -20,7 +20,7 @@ func StartHTTPServer(listenAddr string, handler http.Handler) (listener net.List
var proto, addr string
parts := strings.SplitN(listenAddr, "://", 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
// TODO: Deprecate
proto = types.SocketType(listenAddr)


+ 1
- 1
rpc/tendermint/client/httpclient.go View File

@ -6,7 +6,7 @@ import (
"github.com/pkg/errors"
data "github.com/tendermint/go-wire/data"
events "github.com/tendermint/tmlibs/events"
"github.com/tendermint/go-rpc/client"
"github.com/tendermint/tendermint/rpc/client"
wire "github.com/tendermint/go-wire"
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
"github.com/tendermint/tendermint/types"


+ 1
- 1
rpc/tendermint/core/events.go View File

@ -1,7 +1,7 @@
package core
import (
"github.com/tendermint/go-rpc/types"
"github.com/tendermint/tendermint/rpc/types"
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
"github.com/tendermint/tendermint/types"
)


+ 2
- 2
rpc/tendermint/core/routes.go View File

@ -2,8 +2,8 @@ package core
import (
data "github.com/tendermint/go-wire/data"
rpc "github.com/tendermint/go-rpc/server"
"github.com/tendermint/go-rpc/types"
rpc "github.com/tendermint/tendermint/rpc/server"
"github.com/tendermint/tendermint/rpc/types"
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
"github.com/tendermint/tendermint/types"
)


+ 1
- 1
rpc/tendermint/core/types/responses.go View File

@ -7,7 +7,7 @@ import (
"github.com/tendermint/go-crypto"
data "github.com/tendermint/go-wire/data"
"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/tendermint/types"
)


+ 1
- 1
rpc/tendermint/test/client_test.go View File

@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/require"
abci "github.com/tendermint/abci/types"
. "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"
ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types"
"github.com/tendermint/tendermint/state/txindex/null"


+ 1
- 1
rpc/tendermint/test/helpers.go View File

@ -15,7 +15,7 @@ import (
abci "github.com/tendermint/abci/types"
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"
nm "github.com/tendermint/tendermint/node"
"github.com/tendermint/tendermint/proxy"


+ 1
- 1
rpc/test/main.go View File

@ -5,7 +5,7 @@ import (
"net/http"
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{


+ 1
- 1
test/test_libs.sh View File

@ -15,7 +15,7 @@ fi
# some libs are tested with go, others with make
# 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_MAKE_TEST=(go-rpc go-wire abci)
LIBS_MAKE_TEST=(tendermint/rpc go-wire abci)
for lib in "${LIBS_GO_TEST[@]}"; do


Loading…
Cancel
Save