2017-10-26 12:55:55 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.loafle.net/commons_go/rpc"
|
|
|
|
"git.loafle.net/commons_go/server"
|
|
|
|
)
|
|
|
|
|
2017-10-27 06:01:09 +00:00
|
|
|
func New(addr string, registry rpc.Registry) server.Server {
|
2017-10-26 12:55:55 +00:00
|
|
|
|
2017-11-01 10:05:50 +00:00
|
|
|
sh := NewServerHandler(addr)
|
|
|
|
rpcSH := NewRPCServerHandler(registry)
|
|
|
|
sh.RPCServerHandler = rpcSH
|
2017-10-26 12:55:55 +00:00
|
|
|
|
2017-11-01 06:35:03 +00:00
|
|
|
s := server.New(sh)
|
2017-10-26 12:55:55 +00:00
|
|
|
|
|
|
|
return s
|
|
|
|
}
|