summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-20 17:42:56 +0300
committerValery Piashchynski <[email protected]>2020-12-20 17:42:56 +0300
commitfe0109a3b19ee82bd7bfbb57eae6b5b5166d7068 (patch)
tree52fd2960cb440c99163738fcfeeb6df465662155 /plugins
parent349088db2081704e15699ce1e6f6b1f8898bd336 (diff)
Latest goridge version support
Diffstat (limited to 'plugins')
-rw-r--r--plugins/checker/tests/plugin_test.go4
-rw-r--r--plugins/http/tests/http_test.go6
-rw-r--r--plugins/informer/tests/informer_test.go4
-rw-r--r--plugins/metrics/tests/metrics_test.go28
-rw-r--r--plugins/resetter/tests/resetter_test.go4
-rwxr-xr-xplugins/rpc/plugin.go6
-rw-r--r--plugins/rpc/tests/plugin2.go4
7 files changed, 28 insertions, 28 deletions
diff --git a/plugins/checker/tests/plugin_test.go b/plugins/checker/tests/plugin_test.go
index 02a7f953..38b751ff 100644
--- a/plugins/checker/tests/plugin_test.go
+++ b/plugins/checker/tests/plugin_test.go
@@ -13,7 +13,7 @@ import (
"time"
"github.com/spiral/endure"
- "github.com/spiral/goridge/v3"
+ goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc"
"github.com/spiral/roadrunner/v2/interfaces/status"
"github.com/spiral/roadrunner/v2/plugins/checker"
"github.com/spiral/roadrunner/v2/plugins/config"
@@ -178,7 +178,7 @@ func TestStatusRPC(t *testing.T) {
func checkRPCStatus(t *testing.T) {
conn, err := net.Dial("tcp", "127.0.0.1:6005")
assert.NoError(t, err)
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
st := &status.Status{}
diff --git a/plugins/http/tests/http_test.go b/plugins/http/tests/http_test.go
index 1a61597c..d7818981 100644
--- a/plugins/http/tests/http_test.go
+++ b/plugins/http/tests/http_test.go
@@ -17,7 +17,7 @@ import (
"github.com/golang/mock/gomock"
"github.com/spiral/endure"
- "github.com/spiral/goridge/v3"
+ goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc"
"github.com/spiral/roadrunner/v2"
"github.com/spiral/roadrunner/v2/interfaces/events"
"github.com/spiral/roadrunner/v2/mocks"
@@ -193,7 +193,7 @@ func echoHTTP(t *testing.T) {
func resetTest(t *testing.T) {
conn, err := net.Dial("tcp", "127.0.0.1:6001")
assert.NoError(t, err)
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
// WorkerList contains list of workers.
var ret bool
@@ -213,7 +213,7 @@ func resetTest(t *testing.T) {
func informerTest(t *testing.T) {
conn, err := net.Dial("tcp", "127.0.0.1:6001")
assert.NoError(t, err)
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
// WorkerList contains list of workers.
list := struct {
// Workers is list of workers.
diff --git a/plugins/informer/tests/informer_test.go b/plugins/informer/tests/informer_test.go
index 193e84bb..dd06f1c4 100644
--- a/plugins/informer/tests/informer_test.go
+++ b/plugins/informer/tests/informer_test.go
@@ -10,7 +10,7 @@ import (
"time"
"github.com/spiral/endure"
- "github.com/spiral/goridge/v3"
+ goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc"
"github.com/spiral/roadrunner/v2"
"github.com/spiral/roadrunner/v2/plugins/config"
"github.com/spiral/roadrunner/v2/plugins/informer"
@@ -84,7 +84,7 @@ func TestInformerInit(t *testing.T) {
func informerRPCTest(t *testing.T) {
conn, err := net.Dial("tcp", "127.0.0.1:6001")
assert.NoError(t, err)
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
// WorkerList contains list of workers.
list := struct {
// Workers is list of workers.
diff --git a/plugins/metrics/tests/metrics_test.go b/plugins/metrics/tests/metrics_test.go
index 2d3a3c27..4572bc3f 100644
--- a/plugins/metrics/tests/metrics_test.go
+++ b/plugins/metrics/tests/metrics_test.go
@@ -12,7 +12,7 @@ import (
"time"
"github.com/spiral/endure"
- "github.com/spiral/goridge/v3"
+ goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc"
"github.com/spiral/roadrunner/v2/plugins/config"
"github.com/spiral/roadrunner/v2/plugins/logger"
"github.com/spiral/roadrunner/v2/plugins/metrics"
@@ -298,7 +298,7 @@ func observeMetricNotEnoughLabels(t *testing.T) {
defer func() {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
nc := metrics.NamedCollector{
@@ -331,7 +331,7 @@ func observeMetric(t *testing.T) {
defer func() {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
nc := metrics.NamedCollector{
@@ -364,7 +364,7 @@ func counterMetric(t *testing.T) {
defer func() {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
nc := metrics.NamedCollector{
@@ -398,7 +398,7 @@ func registerHistogram(t *testing.T) {
defer func() {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
nc := metrics.NamedCollector{
@@ -434,7 +434,7 @@ func subVector(t *testing.T) {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
nc := metrics.NamedCollector{
@@ -480,7 +480,7 @@ func subMetric(t *testing.T) {
defer func() {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
nc := metrics.NamedCollector{
@@ -523,7 +523,7 @@ func setOnHistogram(t *testing.T) {
defer func() {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
nc := metrics.NamedCollector{
@@ -558,7 +558,7 @@ func setWithoutLabels(t *testing.T) {
defer func() {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
nc := metrics.NamedCollector{
@@ -593,7 +593,7 @@ func missingSection(t *testing.T) {
defer func() {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
nc := metrics.NamedCollector{
@@ -629,7 +629,7 @@ func vectorMetric(t *testing.T) {
defer func() {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
nc := metrics.NamedCollector{
@@ -665,7 +665,7 @@ func setMetric(t *testing.T) {
defer func() {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
nc := metrics.NamedCollector{
@@ -698,7 +698,7 @@ func addMetricsTest(t *testing.T) {
defer func() {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
m := metrics.Metric{
@@ -718,7 +718,7 @@ func declareMetricsTest(t *testing.T) {
defer func() {
_ = conn.Close()
}()
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret bool
nc := metrics.NamedCollector{
diff --git a/plugins/resetter/tests/resetter_test.go b/plugins/resetter/tests/resetter_test.go
index 45de67e3..95c3a6b4 100644
--- a/plugins/resetter/tests/resetter_test.go
+++ b/plugins/resetter/tests/resetter_test.go
@@ -10,7 +10,7 @@ import (
"time"
"github.com/spiral/endure"
- "github.com/spiral/goridge/v3"
+ goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc"
"github.com/spiral/roadrunner/v2/plugins/config"
"github.com/spiral/roadrunner/v2/plugins/logger"
"github.com/spiral/roadrunner/v2/plugins/resetter"
@@ -83,7 +83,7 @@ func TestResetterInit(t *testing.T) {
func resetterRPCTest(t *testing.T) {
conn, err := net.Dial("tcp", "127.0.0.1:6001")
assert.NoError(t, err)
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
// WorkerList contains list of workers.
var ret bool
diff --git a/plugins/rpc/plugin.go b/plugins/rpc/plugin.go
index c8e63496..98242ade 100755
--- a/plugins/rpc/plugin.go
+++ b/plugins/rpc/plugin.go
@@ -7,7 +7,7 @@ import (
"github.com/spiral/endure"
"github.com/spiral/errors"
- "github.com/spiral/goridge/v3"
+ goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc"
"github.com/spiral/roadrunner/v2/interfaces/log"
rpc_ "github.com/spiral/roadrunner/v2/interfaces/rpc"
"github.com/spiral/roadrunner/v2/plugins/config"
@@ -100,7 +100,7 @@ func (s *Plugin) Serve() chan error {
return
}
- go s.rpc.ServeCodec(goridge.NewCodec(conn))
+ go s.rpc.ServeCodec(goridgeRpc.NewCodec(conn))
}
}()
@@ -161,5 +161,5 @@ func (s *Plugin) Client() (*rpc.Client, error) {
return nil, err
}
- return rpc.NewClientWithCodec(goridge.NewClientCodec(conn)), nil
+ return rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn)), nil
}
diff --git a/plugins/rpc/tests/plugin2.go b/plugins/rpc/tests/plugin2.go
index 347e0330..411b9c54 100644
--- a/plugins/rpc/tests/plugin2.go
+++ b/plugins/rpc/tests/plugin2.go
@@ -6,7 +6,7 @@ import (
"time"
"github.com/spiral/errors"
- "github.com/spiral/goridge/v3"
+ goridgeRpc "github.com/spiral/goridge/v3/pkg/rpc"
)
// plugin2 makes a call to the plugin1 via RPC
@@ -30,7 +30,7 @@ func (p2 *Plugin2) Serve() chan error {
errCh <- errors.E(errors.Serve, err)
return
}
- client := rpc.NewClientWithCodec(goridge.NewClientCodec(conn))
+ client := rpc.NewClientWithCodec(goridgeRpc.NewClientCodec(conn))
var ret string
err = client.Call("rpc_test.plugin1.Hello", "Valery", &ret)
if err != nil {