summaryrefslogtreecommitdiff
path: root/service/rpc.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-05 16:23:14 +0300
committerWolfy-J <[email protected]>2018-06-05 16:23:14 +0300
commit76ff8d1c95e087749d559ee5a4f8f0348feafffa (patch)
tree112630d2d2cfe41d809065034c13b1066b8e05c2 /service/rpc.go
parent3c86132f90ef6473b4073a8b1500d01b6114fc30 (diff)
Cs and refactoring
Diffstat (limited to 'service/rpc.go')
-rw-r--r--service/rpc.go32
1 files changed, 0 insertions, 32 deletions
diff --git a/service/rpc.go b/service/rpc.go
deleted file mode 100644
index eb128768..00000000
--- a/service/rpc.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package service
-
-import (
- "net"
- "strings"
-)
-
-type RPCConfig struct {
- Listen string
-}
-
-func (cfg *RPCConfig) CreateListener() (net.Listener, error) {
- dsn := strings.Split(cfg.Listen, "://")
- if len(dsn) != 2 {
- return nil, dsnError
- }
-
- return net.Listen(dsn[0], dsn[1])
-}
-
-func (cfg *RPCConfig) CreateDialer() (net.Conn, error) {
- dsn := strings.Split(cfg.Listen, "://")
- if len(dsn) != 2 {
- return nil, dsnError
- }
-
- return net.Dial(dsn[0], dsn[1])
-}
-
-func NewBus() *Bus {
- return &Bus{services: make([]Service, 0)}
-}