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
|
|
|
|
|
|
|
sh := NewServerHandler(addr, registry)
|
2017-10-26 13:18:20 +00:00
|
|
|
sh.workersChan = make(chan struct{}, 10)
|
2017-10-26 12:55:55 +00:00
|
|
|
|
|
|
|
s := server.NewServer(sh)
|
|
|
|
|
|
|
|
return s
|
|
|
|
}
|