summaryrefslogtreecommitdiff
path: root/service/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'service/rpc')
-rw-r--r--service/rpc/service.go3
-rw-r--r--service/rpc/service_test.go8
2 files changed, 6 insertions, 5 deletions
diff --git a/service/rpc/service.go b/service/rpc/service.go
index 9cd32755..14e34319 100644
--- a/service/rpc/service.go
+++ b/service/rpc/service.go
@@ -3,9 +3,9 @@ package rpc
import (
"errors"
"github.com/spiral/goridge"
+ "github.com/spiral/roadrunner/service/env"
"net/rpc"
"sync"
- "github.com/spiral/roadrunner/service/env"
)
const (
@@ -16,6 +16,7 @@ const (
// rpc server connection.
EnvKey = "RR_RPC"
)
+
// Service is RPC service.
type Service struct {
cfg *Config
diff --git a/service/rpc/service_test.go b/service/rpc/service_test.go
index e47e9cdd..59e0e05d 100644
--- a/service/rpc/service_test.go
+++ b/service/rpc/service_test.go
@@ -30,7 +30,7 @@ func Test_RegisterNotConfigured(t *testing.T) {
func Test_Enabled(t *testing.T) {
s := &Service{}
- ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9008"},nil)
+ ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9008"}, nil)
assert.NoError(t, err)
assert.True(t, ok)
@@ -38,7 +38,7 @@ func Test_Enabled(t *testing.T) {
func Test_StopNonServing(t *testing.T) {
s := &Service{}
- ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9008"},nil)
+ ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9008"}, nil)
assert.NoError(t, err)
assert.True(t, ok)
@@ -47,7 +47,7 @@ func Test_StopNonServing(t *testing.T) {
func Test_Serve_Errors(t *testing.T) {
s := &Service{}
- ok, err := s.Init(&Config{Enable: true, Listen: "mailformed"},nil)
+ ok, err := s.Init(&Config{Enable: true, Listen: "mailformed"}, nil)
assert.NoError(t, err)
assert.True(t, ok)
@@ -60,7 +60,7 @@ func Test_Serve_Errors(t *testing.T) {
func Test_Serve_Client(t *testing.T) {
s := &Service{}
- ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9018"},nil)
+ ok, err := s.Init(&Config{Enable: true, Listen: "tcp://localhost:9018"}, nil)
assert.NoError(t, err)
assert.True(t, ok)