pcm-kubernetes/main.go

27 lines
522 B
Go

package main
import (
"github.com/robfig/cron/v3"
"go.uber.org/zap"
"jcc-schedule/core"
"jcc-schedule/global"
"jcc-schedule/pkg/apiserver"
internalCron "jcc-schedule/pkg/cron"
)
// @title jcc调度中心
// @version 1.0
// @description jcc
func main() {
global.PCM_VP = core.Viper() // 初始化viper
global.PCM_LOG = core.Zap() // 初始化zap日志
zap.ReplaceGlobals(global.PCM_LOG)
apiserver.NewAPIServer()
c := cron.New(cron.WithSeconds())
c.Start()
internalCron.AddCronGroup(c)
core.RunServer()
}