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.
 
 
 
 
 
 

39 lines
767 B

package main
import (
"github.com/TremblingV5/DouTok/applications/feed/handler"
"github.com/TremblingV5/DouTok/applications/feed/misc"
"github.com/TremblingV5/DouTok/applications/feed/rpc"
"github.com/TremblingV5/DouTok/applications/feed/service"
"github.com/TremblingV5/DouTok/kitex_gen/feed/feedservice"
"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 := feedservice.NewServer(
new(handler.FeedServiceImpl),
options...,
)
if err := svr.Run(); err != nil {
Logger.Fatal(err)
}
}