gcloud

module
v0.2.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2021 License: Apache-2.0

README

gcloud

//go:embed resources/bootstrap.properties
var baseConfig []byte
func main() {
//b, _ := Asset("resources/bootstrap.properties")
application := bootstrap.BootstrapAll(bytes.NewReader(baseConfig), "properties")
defer func() {
if err := recover(); err != nil {
logger.Error("[Main] recover :", err)
os.Exit(0) }
}()
cfg := env.GetInstance()

application.StartMq(cfg.GetString(mq.SERVER_URL_KEY), cfg.GetInt64(mq.CONNECTION_TIMEOUT_KEY), cfg.GetInt64(mq.OPERATION_TIMEOUT_KEY))

consumer.InitConsumer()

application.StartWebServerWith(application.ServerOptions, func(engine *gin.Engine) {
	initRouter(engine)
})

func initRouter(router *gin.Engine) {
china.NewChinaIntance().InitRouter(router)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL