ing
This commit is contained in:
22
client/client.go
Normal file
22
client/client.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"git.loafle.net/commons_go/rpc"
|
||||
"git.loafle.net/commons_go/rpc/client"
|
||||
"git.loafle.net/commons_go/rpc/protocol"
|
||||
)
|
||||
|
||||
func NewClientHandler(addr string, codec protocol.ClientCodec, notifyRegistry rpc.Registry) ClientHandler {
|
||||
ch := &ClientHandlers{}
|
||||
ch.addr = addr
|
||||
ch.RPCRegistry = notifyRegistry
|
||||
ch.Codec = codec
|
||||
|
||||
return ch
|
||||
}
|
||||
|
||||
type ClientHandlers struct {
|
||||
client.ClientHandlers
|
||||
|
||||
addr string
|
||||
}
|
||||
7
client/client_handler.go
Normal file
7
client/client_handler.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package client
|
||||
|
||||
import "git.loafle.net/commons_go/rpc/client"
|
||||
|
||||
type ClientHandler interface {
|
||||
client.ClientHandler
|
||||
}
|
||||
2
client/client_handlers.go
Normal file
2
client/client_handlers.go
Normal file
@@ -0,0 +1,2 @@
|
||||
package client
|
||||
|
||||
Reference in New Issue
Block a user