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