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.
 
 
 
 
 
 

37 lines
765 B

package main
import (
"github.com/TremblingV5/DouTok/applications/user/handler"
"github.com/TremblingV5/DouTok/applications/user/misc"
"github.com/TremblingV5/DouTok/applications/user/rpc"
"github.com/TremblingV5/DouTok/applications/user/service"
"github.com/TremblingV5/DouTok/kitex_gen/user/userservice"
"github.com/TremblingV5/DouTok/pkg/dlog"
"github.com/TremblingV5/DouTok/pkg/initHelper"
)
var (
Logger = dlog.InitLog(3)
)
func Init() {
misc.InitViperConfig()
service.Init()
rpc.InitPRCClient()
}
func main() {
Init()
options, shutdown := initHelper.InitRPCServerArgs(misc.Config)
defer shutdown()
svr := userservice.NewServer(
new(handler.UserServiceImpl),
options...,
)
if err := svr.Run(); err != nil {
Logger.Fatal(err)
}
}