You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
369 B

package server
import (
"log"
"go-common/app/service/main/antispam/conf"
"go-common/app/service/main/antispam/service"
"go-common/library/net/rpc"
)
// New .
func New(config *conf.Config, s service.Service) *rpc.Server {
rpcSvr := rpc.NewServer(config.RPC)
if err := rpcSvr.Register(&Filter{svr: s}); err != nil {
log.Fatalf("%+v", err)
}
return rpcSvr
}