Browse Source

Clean up package names

pull/418/head
Ethan Frey 8 years ago
parent
commit
26f4b5c98e
8 changed files with 16 additions and 16 deletions
  1. +1
    -1
      rpc/client/http/app_test.go
  2. +2
    -2
      rpc/client/http/client.go
  3. +1
    -1
      rpc/client/http/main_test.go
  4. +4
    -4
      rpc/client/http/rpc_test.go
  5. +1
    -1
      rpc/client/local/app_test.go
  6. +2
    -2
      rpc/client/local/client.go
  7. +1
    -1
      rpc/client/local/main_test.go
  8. +4
    -4
      rpc/client/local/rpc_test.go

+ 1
- 1
rpc/client/http/app_test.go View File

@ -1,4 +1,4 @@
package httpclient_test
package http_test
import (
"math/rand"


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

@ -1,5 +1,5 @@
/*
package httpclient returns a Client implementation that communicates
package http returns a Client implementation that communicates
with a tendermint node over json rpc and websockets.
This is the main implementation you probably want to use in
@ -7,7 +7,7 @@ production code. There are other implementations when calling
the tendermint node in-process (local), or when you want to mock
out the server for test code (mock).
*/
package httpclient
package http
import (
"encoding/json"


+ 1
- 1
rpc/client/http/main_test.go View File

@ -1,4 +1,4 @@
package httpclient_test
package http_test
import (
"os"


+ 4
- 4
rpc/client/http/rpc_test.go View File

@ -1,4 +1,4 @@
package httpclient_test
package http_test
import (
"strings"
@ -8,15 +8,15 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
merkle "github.com/tendermint/go-merkle"
httpclient "github.com/tendermint/tendermint/rpc/client/http"
"github.com/tendermint/tendermint/rpc/client/http"
rpctest "github.com/tendermint/tendermint/rpc/test"
"github.com/tendermint/tendermint/types"
)
// GetClient gets a rpc client pointing to the test tendermint rpc
func GetClient() *httpclient.Client {
func GetClient() *http.Client {
rpcAddr := rpctest.GetConfig().GetString("rpc_laddr")
return httpclient.New(rpcAddr, "/websocket")
return http.New(rpcAddr, "/websocket")
}
// Make sure status is correct (we connect properly)


+ 1
- 1
rpc/client/local/app_test.go View File

@ -1,4 +1,4 @@
package localclient_test
package local_test
import (
"math/rand"


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

@ -1,5 +1,5 @@
/*
package localclient returns a Client implementation that
package local returns a Client implementation that
directly executes the rpc functions on a given node.
This implementation is useful for:
@ -12,7 +12,7 @@ are compiled in process.
For real clients, you probably want the "http" package. For more
powerful control during testing, you probably want the "mock" package.
*/
package localclient
package local
import (
nm "github.com/tendermint/tendermint/node"


+ 1
- 1
rpc/client/local/main_test.go View File

@ -1,4 +1,4 @@
package localclient_test
package local_test
import (
"os"


+ 4
- 4
rpc/client/local/rpc_test.go View File

@ -1,4 +1,4 @@
package localclient_test
package local_test
import (
"strings"
@ -8,14 +8,14 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
merkle "github.com/tendermint/go-merkle"
localclient "github.com/tendermint/tendermint/rpc/client/local"
"github.com/tendermint/tendermint/rpc/client/local"
rpctest "github.com/tendermint/tendermint/rpc/test"
)
// GetClient gets a rpc client pointing to the test tendermint rpc
func GetClient() localclient.Client {
func GetClient() local.Client {
node := rpctest.GetNode()
return localclient.New(node)
return local.New(node)
}
// Make sure status is correct (we connect properly)


Loading…
Cancel
Save