go-common/app/service/live/xuserex/server/grpc/server.go
2019-04-22 18:49:16 +08:00

20 lines
418 B
Go

package grpc
import (
v1pb "go-common/app/service/live/xuserex/api/grpc/v1"
"go-common/app/service/live/xuserex/service"
"go-common/library/net/rpc/warden"
)
// New new grpc server
func New(svc *service.Service) (wsvr *warden.Server, err error) {
wsvr = warden.NewServer(nil)
v1pb.RegisterRoomNoticeServer(wsvr.Server(), svc.RoomNoticeV1Svc())
if wsvr, err = wsvr.Start(); err != nil {
return
}
return
}